-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
64 lines (59 loc) · 4.25 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>海外B站加速</title>
</head>
<body>
<div style="margin: 10px auto;">
<div style="width: 600px; margin: 0 auto;">
<p>
海外用户观看B站视频, 可使用mini播放器, 降低画质以减少流量.
</p>
<p>
将此链接<a href="javascript:(function (){var url = location.href;url = url.split('/');var aid = '';var page = '1';for (var i=0;i<url.length;i++) { if (0 == url[i].search('av')) aid = url[i].substr(2); if (0 == url[i].search('index_')) page = url[i].substr(6, 1)}/*height='356' width='440'*/var template='<div style="height: 100%;width: 100%;position: fixed;top: 0;left: 0;z-index: 1000;"><center><embed height="640" width="860" style="visibility: visible; margin-top:5%; margin-bottom:10px;" pluginspage="http://get.adobe.com/cn/flashplayer/" flashvars="playMovie=true&auto=1" allowfullscreen="true" quality="high" src="http://static.hdslb.com/miniloader.swf?aid={{aid}}&page={{page}}" type="application/x-shockwave-flash" wmode="transparent" title="Adobe Flash Player"><br/><input id="bili-hide" style="margin: auto auto; width: 6em; height: 2.5em;" type="button" value="close"/></center><div style="height: 100%;width: 100%;background-color: #000000;position: fixed;top: 0;left: 0;opacity: 0.8;z-index: -1;"></div></div>';template=template.replace('{{aid}}', aid);template=template.replace('{{page}}', page);var div = document.createElement('div');div.setAttribute('id', 'bili-mini');div.innerHTML = template;document.body.appendChild(div);var hide = function() { var node = document.getElementById("bili-mini"); if (null == node) return; document.body.removeChild(node); };var button = document.getElementById('bili-hide');if (button) button.onclick = hide;})();" style="border: 1px solid;">BliBli-mini</a>加入收藏夹, 在视频页面点击收藏链接执行脚本即可.
</p>
源码:
</div>
<div style="width: 600px; margin: 0 auto; border: 1px solid;">
<pre style="white-space: pre-wrap; padding: 0 1em 0 1em;">
(function (){
var url = location.href;
url = url.split('/');
var aid = '';
var page = '1';
for (var i=0;i<url.length;i++) {
if (0 == url[i].search('av'))
aid = url[i].substr(2);
if (0 == url[i].search('index_'))
page = url[i].substr(6, 1)
}
/*height='356' width='440'*/
var template='<div style="height:100%; width:100%; position:fixed; top:0; left:0; z-index:1000;"> \
<center> \
<embed height="640" width="860" style="visibility:visible; margin-top:5%; margin-bottom:10px;" pluginspage="http://get.adobe.com/cn/flashplayer/" flashvars="playMovie=true&auto=1" allowfullscreen="true" quality="high" src="http://static.hdslb.com/miniloader.swf?aid={{aid}}&page={{page}}" type="application/x-shockwave-flash" wmode="transparent" title="Adobe Flash Player"> \
<br/> \
<input id="bili-hide" style="margin:auto auto; width:6em; height:2.5em;" type="button" value="close"/> \
</center> \
<div style="height:100%; width:100%; background-color:#000000; position:fixed; top:0; left:0; opacity:0.8; z-index:-1;"> \
</div> \
</div>';
template=template.replace('{{aid}}', aid);
template=template.replace('{{page}}', page);
var div = document.createElement('div');
div.setAttribute('id', 'bili-mini');
div.innerHTML = template;
document.body.appendChild(div);
var hide = function() {
var node = document.getElementById("bili-mini");
if (null == node)
return; document.body.removeChild(node);
};
var button = document.getElementById('bili-hide');
if (button)
button.onclick = hide;
})();
</pre>
</div>
</div>
</body>