-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
538 lines (492 loc) · 19.4 KB
/
index.html
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="author" content="shellvon">
<meta name="description" content="zh-downloader 一个支持嗅探知乎视频并支持直接下载的浏览器插件">
<meta name="keywords" content="知乎下载器 zh-downloader m3u8 sniffer chrome-extension firefox-addons">
<title>知乎视频下载器-浏览器插件</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/cosmo/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/css/swiper.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.css">
</head>
<style>
.lead {
font-size: 18px;
}
header {
text-align: center;
color: white;
position: relative;
overflow: hidden;
font-size: 1.2em;
padding: 65px 60px 60px;
background: linear-gradient(135deg, #050a0e, #0a131d);
}
header .illustration {
margin: 60px auto -60px;
text-align: center;
max-width: 1194px;
font-size: 10px;
}
.windowed {
margin: 0 auto;
position: relative;
padding-top: 2.4em;
background: #f3f3f3;
border-radius: 5px;
}
.windowed:before {
content: "";
width: 1em;
height: 1em;
border-radius: 50%;
position: absolute;
top: .7em;
left: .8em;
background: #f46965;
box-shadow: 1.4em 0 #e9cd06, 2.8em 0 #81d95e;
}
.navbar-brand img {
margin-right: 10px;
display: inline-block;
}
header .illustration img {
margin: 0 auto;
max-width: 100%;
height: auto;
display: block;
}
.btn {
border-radius: 2em;
font-weight: 700;
outline: 0 !important;
transition: .2s;
}
#screenshot {
padding: 50px 0;
text-align: center;
margin-bottom: 40px;
}
.simple-slider {
max-width: 1200px;
margin: 0 auto;
}
.simple-slider .swiper-slide {
display: flex;
align-items: center;
height: 540px;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
s.simple-slider .slide-content {
max-width: 90%;
max-height: 460px;
margin: 20px auto 60px;
display: block;
border-radius: 6px;
box-shadow: 0 0 10px rgba(0, 0, 0, .12);
overflow: hidden;
}
.simple-slider .slide-content.windowed img {
max-width: 100%;
margin: 0 auto;
}
.tinted {
background-color: #f4f8fb;
}
#features,
.feature {
margin-top: 70px;
}
#features .item {
padding-left: 70px;
position: relative;
margin-bottom: 30px;
}
#features .icon {
position: absolute;
left: 16px;
font-size: 28px;
color: #2789e4;
}
#change-logs {
margin-top: 70px;
}
#change-logs .version {
display: flex;
padding: 30px 30px 0;
border-top: 1px solid #ddd;
max-width: 1000px;
margin: 0 auto 30px;
}
#change-logs .version:first-of-type {
margin-top: 70px;
}
#change-logs .heading {
margin-bottom: 20px;
font-size: 24px;
width: 240px;
flex-shrink: 0;
}
#change-logs .heading .date {
color: grey;
font-size: 16px;
display: block;
margin-top: 3px;
}
#change-logs .heading .download-btn-group a {
padding: 4px 10px;
border-radius: 4px;
text-align: center;
display: inline-block;
font-size: 12px;
margin-bottom: 15px;
margin-top: 10px;
border: 1px solid #fff;
}
#change-logs .heading .download-btn-group .icon {
padding-right: 4px;
}
#change-logs .version ul {
padding-left: 20px;
margin-bottom: 0;
}
#change-logs .version ul li a {
padding: 0 5px;
}
.tag {
padding: 4px 10px;
border-radius: 4px;
text-align: center;
display: inline-block;
font-size: 12px;
margin-bottom: 15px;
margin-top: 10px;
border: 1px solid #fff;
}
.tag strong {
text-transform: uppercase;
}
.tag.new {
border-color: #49aee4;
color: #49aee4;
}
.tag.update {
border-color: #88bf57;
color: #79b544;
}
.tag.fixed {
border-color: #6d7a8a;
color: #6d7a8a;
}
footer {
background-color: #fff;
text-align: center;
color: #2b3137;
border-top: 1px solid #ebf1f5;
padding: 50px 30px;
margin-top: 50px;
line-height: 1.8;
}
</style>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand navbar-link" href="#">
<img src="./assets/logo/icon_128.png" width="34">Zh-downloader</a>
<button class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navcol-1">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navcol-1">
<a class="btn btn-primary navbar-btn navbar-right" target="_blank" role="button" href="https://chrome.google.com/webstore/detail/zh-downloader/gcknejnpflbcggigdinhahgngfhaomik?utm_source=chrome-ntp-icon">下载插件</a>
<ul id="menu" class="nav navbar-nav navbar-right">
<li role="presentation">
<a href="#header">主页</a>
</li>
<li role="presentation">
<a href="#screenshot">截图</a>
</li>
<li role="presentation">
<a href="#features">特性</a>
</li>
<li role="presentation">
<a href="#change-logs">日志</a>
</li>
<li role="presentation">
<a href="https://github.com/shellvon/zh-downloader/wiki/%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E">文档</a>
</li>
</ul>
</div>
</div>
</nav>
<!--Header Section.-->
<header id="header">
<img src="./assets/logo/icon_128.png" alt="Logo" width="128" height="128">
<h1>
<strong>Zh-downloader</strong> by shellvon</h1>
<p class="text-muted">一个非常给力的用于嗅探和下载知乎视频的浏览器插件</p>
<a class="btn button btn-primary hidden-xs hidden-sm" href="https://chrome.google.com/webstore/detail/zh-downloader/gcknejnpflbcggigdinhahgngfhaomik?utm_source=chrome-ntp-icon">
Download from Google Store </a>
<a class="btn button btn-success hidden-xs hidden-sm" href="https://github.com/shellvon/zh-downloader/releases">
<i class="icon icon-social-github"></i> Download from Github</a>
<div class="illustration windowed">
<img src="http://tva1.sinaimg.cn/large/9d8084a3gy1fu78jp21s4g20yl0hy4qz.gif" alt="App Screenshot">
</div>
</header>
<!--Screenshot Section-->
<div id="screenshot" class="tinted">
<h3>功能截图</h3>
<p class="lead">全自动嗅探知乎视频资源, 并提供丰富多彩的功能:比如下载/复制/分享等</p>
<div class="simple-slider">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="slide-content windowed">
<img src="./assets/screenshot/screenshot_a.jpg" alt="采集截图">
</div>
</div>
<div class="swiper-slide">
<div class="slide-content windowed">
<img src="./assets/screenshot/screenshot_b.jpg" alt="采集截图">
</div>
</div>
<div class="swiper-slide">
<div class="slide-content windowed">
<img src="./assets/screenshot/screenshot_c.jpg" alt="采集截图">
</div>
</div>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
</div>
</div>
<!--Features Section-->
<div id="features">
<h3 class="text-center">功能特性</h3>
<p class="lead text-center">麻雀虽下, 五脏俱全. zh-downloader 拥有令人难以置信的功能</p>
<div class="container feature">
<div class="row">
<div class="col-md-5 col-md-offset-2 item">
<i class="icon-magnifier icon"></i>
<h4>自动嗅探</h4>
<p>所有知乎视频自动采集和嗅探,无需用户干预</p>
</div>
<div class="col-md-5 item">
<i class="icon-eye icon"></i>
<h4>详细数据/参数</h4>
<p>视频信息(ID/视频原地址/封面图/大小/时长/名称/格式)等多规格一览无余,支持复制地址至其他平台下载</p>
</div>
<div class="clearfix hidden-xs hidden-sm"></div>
<div class="col-md-5 col-md-offset-2 item">
<i class="icon-cloud-download icon"></i>
<h4>多格式下载</h4>
<p>支持多清晰度/多种格式(MP4/MPEG-TS2)提供下载 </p>
</div>
<div class="col-md-5 item">
<i class="icon-heart icon"></i>
<h4>自定义配置</h4>
<p>支持自定义偏好设置,比如您可以自己设置用于转化MP4的转化器是什么,偏爱的默认格式是什么.</p>
</div>
<div class="clearfix hidden-xs hidden-sm"></div>
<div class="col-md-5 col-md-offset-2 item">
<i class="icon-info icon"></i>
<h4>下载反馈</h4>
<p>实时友好展示下载/转化进度</p>
</div>
<div class="col-md-5 item">
<i class="icon-trash icon"></i>
<h4>自动清理</h4>
<p>自动清理超过一定历史的视频文件</p>
</div>
<div class="clearfix hidden-xs hidden-sm"></div>
<div class="col-md-5 col-md-offset-2 item">
<i class="icon-share icon"></i>
<h4>分享功能</h4>
<p>可使用二维码/微博/链接等分享视频</p>
</div>
<div class="col-md-5 item">
<i class="icon-star icon"></i>
<h4>精选视频推荐</h4>
<p>支持精选视频推荐,包含优质的回答/博文</p>
</div>
<div class="clearfix hidden-xs hidden-sm"></div>
<div class="col-md-5 col-md-offset-2 item">
<i class="icon-bulb icon"></i>
<h4>简单易用</h4>
<p>纯前端Javascript实现, 不需要任何依赖.下载即用</p>
</div>
<div class="col-md-5 item">
<i class="icon-rocket icon"></i>
<h4>好看的UI</h4>
<p>采用Element 制作, UI 不算太差</p>
</div>
<div class="clearfix hidden-xs hidden-sm"></div>
<div class="col-md-5 col-md-offset-2 item">
<i class="icon-energy icon"></i>
<h4>自动重试</h4>
<p>当出现网络问题时,系统会自动尝试重试(最多3次)</p>
</div>
<div class="col-md-5 item">
<i class="icon-magic-wand icon"></i>
<h4>高级嗅探</h4>
<p>除了知乎,其他网站也可以哦</p>
</div>
<div class="clearfix hidden-xs hidden-sm"></div>
</div>
</div>
</div>
<!--ChangeLogs Section-->
<div id="change-logs" class="tinted">
<div class="container">
<h2 class="text-center">
变更日志</h2>
<p class="lead text-center">zh-downloader 一直保持着更新迭代,以保证此应用的稳定(从1.0.9开始亦支持 Firefox ). 以下是版本变更历史</p>
<!--😊-->
</div>
</div>
<footer>
<h3>官网都看完了,不来
<a href="https://chrome.google.com/webstore/detail/zh-downloader/gcknejnpflbcggigdinhahgngfhaomik?utm_source=chrome-ntp-icon">试一试</a>?</h3>
<p class="copyright">Copyright © 2018
<a href="https://github.com/shellvon/zh-downloader" target="_blank">Zh-downloader</a> 知乎视频下载器</p>
</footer>
<script id="template-change-log" type="text/template">
<%for(var i=0, l=this.data.length; i < l; i++) {
var currentVersion = this.data[i];
var logs = currentVersion.logs;
%>
<div class="version">
<div class="heading">
<strong>
Version <%currentVersion.version%>
</strong>
<span class="date">
<%currentVersion.date%>
</span>
<div class="download-btn-group">
<%if (currentVersion.crx) {%>
<a class="btn btn-primary" href="<%currentVersion.crx%>">
<i class="icon icon-pin"></i>CRX</a>
<%} if (currentVersion.zip) {%>
<a class="btn btn-success" href="<%currentVersion.zip%>">
<i class="icon icon-paper-clip"></i>ZIP</a>
<%}%>
</div>
</div>
<div class="notes">
<% for (var type in logs) {
var items = logs[type];
%>
<div class="tag <%type%>">
<strong><%type%></strong>
</div>
<ul><%for(var idx in items) {
var text = items[idx].text;
var links = (items[idx].links || []).join(',');
%><li><%text + links%></li>
<%}%>
</ul>
<%}%>
</div>
</div>
<%}%>
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=66093431" charset="UTF-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/js/swiper.jquery.min.js"></script>
<script>
// http://idangero.us/swiper/get-started/
var mySwiper = new Swiper('.swiper-container', {
loop: true,
pagination: ".swiper-pagination",
paginationClickable: true,
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev'
});
// 简单的JS模版引擎.
// see => http://krasimirtsonev.com/blog/article/Javascript-template-engine-in-just-20-line
var simpleTemplateEngine = function (html, options) {
var re = /<%([^%>]+)?%>/g,
reExp = /(^( )?(var|if|for|else|switch|case|break|{|}))(.*)?/g,
code = 'var r=[];\n',
cursor = 0,
match;
var add = function (line, js) {
js ? (code += line.match(reExp) ? line + '\n' : 'r.push(' + line + ');\n') :
(code += line != '' ? 'r.push("' + line.replace(/"/g, '\\"') + '");\n' : '');
return add;
}
while (match = re.exec(html)) {
add(html.slice(cursor, match.index))(match[1], true);
cursor = match.index + match[0].length;
}
add(html.substr(cursor, html.length - cursor));
code += 'return r.join("");';
return new Function(code.replace(/[\r\t\n]/g, '')).apply(options);
}
// 根据用户输入生成链接
// 格式:
// a. commit-hash-id or #commit-hash-id or user/project#commit-hash-id
// b. issue-id or #issue-id or user/project#issue-id
// c. https://xx or http://xx
// 其他格式一律返回空null.
var makeHref = function (input) {
githubCommitOrIssuesRegex = /^(?:([^#]*)#)?(\d+|[a-z\d]{8,})$/
result = githubCommitOrIssuesRegex.exec(input)
if (/^https?:\/\//.test(input)) {
href = input
text = input
} else if (result) {
project = result[1] || 'shellvon/zh-downloader'
commitOrIssues = result[2]
type = commitOrIssues.match(/^\d+$/) ? 'issues' : 'commit'
href = 'https://github.com/' + project + '/' + type + '/' + commitOrIssues;
// 如果类型是issues并且没有指定用用户,则需要加上#在前面
text = (type === 'issues' && !result[1]) ? '#' + commitOrIssues : input;
} else {
console.error('invalid input to make href:', input)
return;
}
return '<a href="{href}">{text}</a>'.replace('{href}', href).replace('{text}', text);
}
$(document).ready(function () {
$.ajax({
url: './changelog.json',
dataType: 'json'
}).done(function (data) {
var parsedData = data.map(function (el) {
var logs = el.logs;
for (var type in logs) {
if (!logs[type] || logs[type].length === 0) {
delete el.logs[type]
continue;
}
details = logs[type]
details.map(function (el) {
el.links = (el.issues || []).map(makeHref).concat((el.commit ||
[]).map(makeHref));
});
el.logs[type] = details
}
return el;
});
var html = simpleTemplateEngine($('#template-change-log').html(), {
data: parsedData
})
$('#change-logs').append(html);
});
});
</script>
</body>
</html>