|
@@ -19,9 +19,15 @@
|
19
|
19
|
document.getElementById('in').style.display = 'none';
|
20
|
20
|
|
21
|
21
|
var iframe = document.createElement('iframe');
|
22
|
|
- var url = decodeURIComponent(window.top.location.toString().replace(/^.*\?to=(.*)$/, '$1'));
|
|
22
|
+ var ourl = window.top.location.toString();
|
|
23
|
+ var url = ourl.replace(/^.*\?to=(.*)$/, '$1');
|
|
24
|
+ if (url == ourl)
|
|
25
|
+ url = location.protocol + '//' + location.host.replace(/[^\.\/]+\.([^\.\/]+\.[^\.\/]+)/, '$1');
|
|
26
|
+ if (url == ourl)
|
|
27
|
+ url = 'https://can-i.help/';
|
|
28
|
+
|
23
|
29
|
iframe.style.display = 'none';
|
24
|
|
- iframe.src = 'javascript:window.top.location.replace("'+url.replace(/"/g, '"')+'")';
|
|
30
|
+ iframe.src = 'javascript:window.top.location.replace("'+decodeURIComponent(url).replace(/"/g, '"')+'")';
|
25
|
31
|
iframe.referrerpolicy = "no-referrer";
|
26
|
32
|
document.getElementsByTagName('body')[0].appendChild(iframe);
|
27
|
33
|
clearInterval(interval);
|
|
@@ -35,12 +41,24 @@
|
35
|
41
|
<style>
|
36
|
42
|
html, body { margin: 0; padding: 0; box-sizing: border-box; line-height: normal; text-align: center; font-family: monospace; font-size: 30px; }
|
37
|
43
|
header {
|
38
|
|
- margin: 50px 0 0;
|
|
44
|
+ margin: 50px 0;
|
39
|
45
|
padding: 10px 20px;
|
40
|
46
|
}
|
41
|
47
|
#in {
|
42
|
48
|
font-size: 12px; margin-top: 8px;
|
43
|
49
|
}
|
|
50
|
+footer {
|
|
51
|
+position: fixed;
|
|
52
|
+ bottom: 0;
|
|
53
|
+ left: 0;
|
|
54
|
+ right: 0;
|
|
55
|
+ padding: 10px;
|
|
56
|
+ font-size: 10px;
|
|
57
|
+}
|
|
58
|
+footer a {
|
|
59
|
+color: #777;
|
|
60
|
+ text-decoration: none;
|
|
61
|
+}
|
44
|
62
|
</style>
|
45
|
63
|
</head>
|
46
|
64
|
<body>
|
|
@@ -48,5 +66,6 @@
|
48
|
66
|
Redirecting..
|
49
|
67
|
<div id="in">in <span>2s</span></div>
|
50
|
68
|
</header>
|
|
69
|
+<footer><a href="https://code.can-i.help/luna/luna-noreferrer-redirect">Source code</a></footer>
|
51
|
70
|
</body>
|
52
|
71
|
</html>
|