-
Notifications
You must be signed in to change notification settings - Fork 213
/
tvn.cfo.min.js
45 lines (38 loc) · 1.18 KB
/
tvn.cfo.min.js
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
// JavaScript Document
var yousite = "m.tvn.cc";
var url = window.document.location.pathname;
var url = "" + url;
var site = "https://" + yousite + url;
var system = {
win: false,
mac: false,
xll: false
};
var p = navigator.platform;
system.win = p.indexOf("Win") == 0;
system.mac = p.indexOf("Mac") == 0;
system.x11 = (p == "x11") || (p.indexOf("Linux") == 0);
if (system.win || system.mac || system.xll) {
}
else {
window.location.href = site;
}
/*
var randoms = {
ads_codes: ['<script type="text/javascript"> var targetProtocol = "https:"; if (window.location.protocol != targetProtocol) window.location.href = targetProtocol + window.location.href.substring(window.location.protocol.length); <' + '/script>'],
ads_weight: [10],
get_random: function (weight) {
var s = eval(weight.join('+'));
var r = Math.floor(Math.random() * s);
var w = 0;
var n = weight.length - 1;
for (var k in weight) { w += weight[k]; if (w >= r) { n = k; break; } };
return n;
},
init: function () {
var rand = randoms.get_random(randoms.ads_weight);
document.write(randoms.ads_codes[rand]);
}
}
*/
//randoms.init();