This repository has been archived by the owner on Apr 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
58 lines (55 loc) · 1.8 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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>Ck.M3u8</title>
<style type="text/css">
body, html, video {background-color: #000;padding: 0;margin: 0;width: 100%;height: 100%;color: #aaa;}
</style>
<body style="margin:0;background-color:black;overflow-y: hidden">
<script type="text/javascript" src="ckplayerx/ckplayer.js"></script>
<div class="video" style="width:100%;height:100%;"></div>
<script type="text/javascript">
function isIE() {
return (!!window.ActiveXObject || "ActiveXObject" in window)
}
var hash = window.location.hash;
var temp = (window.location.href+(hash?"#"+hash:"")).split("?")[1].split("&");
var params = {}, pk = "", pks = ["v", "a", "t"];
for (var i=0; i<temp.length; i++) {
var _ = temp[i].split("="), k = _[0], v = _[1];
if (pks.indexOf(k) == -1) {
params[pk] += "&"+decodeURIComponent(k)+(v == undefined?"":"="+decodeURIComponent(v));
continue;
}
params[k] = decodeURIComponent(v);
for (var j=2; j<_.length; j++) {
params[k] += "="+decodeURIComponent(_[j]);
}
pk = k;
}
document.title = params["t"]||document.title;
var temp = document.cookie.split("; ");
var cookie = {}
for (var i=0; i<temp.length; i++) {
var _ = temp[i].split("="), k = _[0], v = _[1];
cookie[k] = decodeURIComponent(v);
}
var vurl = params["v"].split("/");
for (var i=3; i<vurl.length; i++) {
vurl[i] = encodeURIComponent(vurl[i]);
}
vurl = vurl.join("/");
document.title = encodeURIComponent(params["t"])||document.title;
var videoObject = {
container: '.video',
variable: 'player',
autoplay:(params["a"] == 1?true:isIE()),
html5m3u8:!isIE(),
video: vurl
};
var player=new ckplayer(videoObject);
</script>
<div style="display:none"></div>
</body>
</html>