-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathindex.html
More file actions
205 lines (183 loc) * 9.7 KB
/
index.html
File metadata and controls
205 lines (183 loc) * 9.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
---
layout: default
comments: true
---
<script src="{{ site.baseurl }}/assets/js/hero.js">script>
<div id="news">
<ul id="results-container" class="searched" style="color: #2980B9;">ul>
div>
<div id="noscript-content" class="text-center">
<h4 class="text-center">HeroBotShuo h4>
<p class="text-center">Shi Yao Du Bu Bi Shuo ,Wo Zhi Dao Wo Ming Liao p>
<p class="text-center">Ta Men Shuo JavascriptShi Mo E Zhi Yuan p>
<p class="text-center"><b>Dan Shi b>,Zhen Zheng De An Quan Zhi You Kao Tor, Qu Zhuang Ge <a href="https://www.torproject.org/download/">Tor Browsera>Huo <a href="https://www.privacytools.io/operating-systems/#tor_os">Shuang Xu Ni Ji a>Ba p>
<p class="text-center">Yin Wei <a href="https://github.com/diymysite/analytics/blob/master/pages/analytics.md">Chu Liao E Yi Wang Ye Cha Jian ,Huan You Yi Mo Chong Fang Fa Jian Shi Ni a>.p>
<p class="text-center">Que Shao javascriptDe Shi Jie Shi Can Que De ,Jiu Xiang Mei You Ying Xiong De Shi Jie p>
<p class="text-center"><b>Dang Ran b>,Ni Ke Yi Zhi Jie Yue Du <a href="https://raw.githubusercontent.com/NodeBE4/hero/master/index.json">Yuan Shi Shu Ju a>Huo Zhe Wang Ye Dai Ma p>
<p class="text-center"><i>Javascript is the most beautiful language.i>p>
<p class="text-center"><i>BITE MEi>p>
div>
<table id="add-hero-form" class="table table-striped table-bordered table-sm" style="width:100%;">
table>
<div style="font-size: 12px">
<span style="color: #3498DB;"><i>"Zan Bu Hui Li Ji Sheng Xiao ,Mei Xiao Shi Huo Chuang Jian Xin Ren Wu Shi Geng Xin Yi Ci . "i>span>;
<span style="color: #3498DB;"><b>Shou Lu Shuo Ming b>:<i>"Bi Xu Wei GitHub/GitLab Xiang Mu ,project Lian Jie Wei GitHub/GitLab Lian Jie "i>span>;
div>
<hr>
<div class="row">
<div class="col-12 col-md-6">
<h4>Qing Zai Ci Chu Jian Ru Ni Xi Huan De Ying Xiang Li Xiang Mu h4>
<span style="color: #3498DB;width:100%; font-size:14px"><b><a href="https://github.com/Terminus2049/">Xiao Er a>:b>"Bu Yao Wen Zi Ji Neng Fou Gai Bian Shi Jie ,Shi Jie Cong Lai Du Shi Zhe Yang Bei Gai Bian De . Zhao Dao Ni Guan Xin De Yi Ti ,Can Yu Jin Lai ;Ru Guo Huan Mei You ,Na Jiu Chuang Jian Yi Ge !"span>
<p style="color: #566573;font-size: 12px;">Ti Shi :Ti Jiao Huo Tou Piao Cheng Gong Huo Xu approvePi Zhun no scriptDan Chu De Jing Gao . p>
<form id="add-hero-form" action="https://impact-form.vercel.app/api/submit" method="post" target="_blank">
<div class="form-group">
<input name="url" type="url" placeholder="Kai Yuan repoLian Jie https://github.com/..." style="display:table-cell; width:100%; max-width: 600px;"><br>
<textarea name="message" style="width: 100%; max-width: 600px; height: 100px;" placeholder="Xiang Mu Miao Shu ...">textarea>
<div><input type="submit" value="Ti Jiao "/>div>
div>
form>
div>
<div class="col-12 col-md-6">
<h4>Guan Yu h4>
<div id="about-hero">
<p><b>Shuo Ming :b>Ben Bang Lai Zi Duan Dian Xing De <a href="https://github.com/Terminus2049/Awesome-Social-Impact">Awesome-Social-Impacta>,Ti Gong Yuan Shi <a href="https://nodebe4.github.io/impact/index.json">Shu Ju a>Ji <a href="https://github.com/NodeBE4/impact/">Dai Ma a>. p>
<p><b>Can Yu :b>Huan Ying You Cai Hua De Nin Gong Xian Nin De Xiang Fa , Dai Ma , Huo Yi Shu She Ji ,Xiang Guan Tao Lun Jian <a href="https://github.com/NodeBE4/impact/issues/1">issuea>. <i style="color: #FF445D">Huan Ying You Zhan hostBen Ye Jing Xiang (Jian :<a href="https://github.com/NodeBE4/impact">Fang Fa a>Yu <a href="https://impact-form.vercel.app/">Shi Li a>).i>p>
<p style="color: #803030;"><b>Yin Si :b>Ren Wu <i>Ti Jiao i>Huo <i>Dian Zan i><i class="fa fa-thumbs-o-up">i>Wu Xu Zhu Ce Huo Deng Lu ,Ben Bang Wu Fa Huo Zhi Nin De IPDi Zhi Huo Liu Lan Qi Zhi Wen Deng Yin Si . p>
<p style="font-size: 12px;"><b>Kai Yuan :b>Ying Xiong Bang De APIKai Fang <a href="https://github.com/NodeBE4/impact-form">Yuan Dai Ma a>Qie Shi Ji Bu Shu Jing Di San Fang APITuo Guan Ping Tai <a href="https://vercel.com">vercela>Suo <a href="https://github.com/NodeBE4/impact-form/commits/master">Yan Zheng a>.p>
<div style="font-size:12px">License: GPL-3.0-or-laterdiv>
div>
div>
div>
{% include simple-search.html %}
<div style="display:none">
<iframe id="iframe-vote" src="{{ site.baseurl }}/vote">iframe>
div>
{% include disqus.html %}
<script type="text/javascript" >
// $(document).ready(function() {
// $('#add-hero-form').DataTable();
// } );
document.addEventListener("DOMContentLoaded", function(event){
var url = "{{ site.baseurl }}/index.json";
var id = "add-hero-form";
var table = document.getElementById(id);
var noscript = document.getElementById("noscript-content");
noscript.parentNode.removeChild(noscript)
const thead_format = {
'vote': '',
'repo': 'Cang Ku ',
'author': 'Zuo Zhe ',
'desc': 'Miao Shu ',
'search': '',
'update': '',
'star': '',
'fork': '',
'contributors': '',
}
$.getJSON(url, function(json) {
herolist = json;
var thead = document.createElement('thead');
var tbody = document.createElement('tbody');
var tfoot = document.createElement('tfoot');
table.appendChild(thead)
table.appendChild(tbody)
table.appendChild(tfoot)
var tr0 = document.createElement('tr');
thead.appendChild(tr0);
var thead_vals = Object.values(thead_format)
var thead_keys = Object.keys(thead_format)
thead_vals.map(item => {
var th = document.createElement('th')
th.innerHTML = item
tr0.appendChild(th)
});
var lis = herolist.map(item => {
let texts = item['repo'].split('/')
let origin = texts[2]
let author = texts[3]
let reponame = texts[4]
let authorlink = texts.slice(0,4).join('/')
let host = origin.split('.')[0]
let tr = document.createElement('tr');
tbody.appendChild(tr)
thead_keys.map(key => {
let td1 = document.createElement('td');
if (key == 'repo'){
if (origin=='github.com'){
}else if (origin=='gitlab.com'){
}
}else if(key=='vote'){
let val = item[key] || 0
td1.innerHTML += val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
td1.id = "vote-cnt-"+item.hash
}else if (key == 'author'){
}else if (key=='update'){
let imglink = `https://img.shields.io/${host}/last-commit/${author}/${reponame}?label=%20`
}else if (key=='star'){
let imglink = `https://img.shields.io/${host}/stars/${author}/${reponame}?label=%20`
}else if (key=='fork'){
let imglink = `https://img.shields.io/${host}/forks/${author}/${reponame}?label=%20`
}else if (key=='contributors'){
let imglink = `https://img.shields.io/${host}/contributors/${author}/${reponame}?label=%20`
}else if (key=='search'){
let searchlink = `https://github.com/search?q=${reponame}`
}else{
let val = item[key] || 0
td1.innerHTML = `${val}`
}
tr.appendChild(td1);
});
});
var tr2 = document.createElement('tr');
tfoot.appendChild(tr2);
thead_vals.map(item => {
var th = document.createElement('th')
th.setAttribute("data-field", item)
th.innerHTML = item
tr2.appendChild(th)
});
$('#add-hero-form').DataTable( {
"order": [[ 0, "desc" ]],
"language": {
"url": "//cdn.datatables.net/plug-ins/1.10.21/i18n/Chinese.json"
},
"pageLength": 50
});
console.log(table)
})
});
var iframe = document.getElementById("iframe-vote");
iframe.contentWindow.document.addEventListener("DOMContentLoaded", function(event){
var voteform = iframe.contentWindow.document.getElementById("vote-form");
voteform.addEventListener('submit', function(event){
event.preventDefault();
});
})
function vote_hero(hash){
console.log(hash)
var btn = document.getElementById("vote-"+hash)
var cell = document.getElementById("vote-cnt-"+hash)
var count = parseInt(cell.innerText) + 1
btn.parentNode.removeChild(btn)
console.log(count)
cell.innerText = count.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
// var form = document.getElementById("vote-form")
var form = iframe.contentWindow.document.getElementById("vote-form");
var inputhash = iframe.contentWindow.document.getElementById("input-hash")
inputhash.value=hash
form.submit()
// sendData(form)
setTimeout(function(){ iframe.contentWindow.location.reload(); }, 3000)
return false
}
script>