-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathload.html
128 lines (125 loc) · 4.49 KB
/
load.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
<!DOCTYPE html>
<html>
<head>
<!--
Incognito
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<script src="https://t1.staticdev.org/uv/uv.bundle.js"></script>
<script src="https://t2.staticdev.org/uv/uv.config.js"></script>
<style>
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('./css/Roboto-Regular.ttf') format('woff');
}
body {
background: #111;
display: flex;
flex-direction: column;
justify-content: center;
min-height: 100vh;
margin: 0px;
align-items: center;
}
.msg {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
p {
font-family: Roboto;
}
.info {
color: #FFF;
max-width: 600px;
text-align: center;
margin: 35px 0px 0px 0px;
}
.lds-dual-ring {
display: inline-block;
width: 160px;
height: 160px;
}
.lds-dual-ring:after {
content: " ";
display: block;
width: 128px;
height: 128px;
margin: 16px;
border-radius: 50%;
border: 12px solid #fff;
border-color: #fff transparent #fff transparent;
animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="msg">
<div class="lds-dual-ring"></div>
<p class="info">
Please wait a moment.
Our service maybe under high load causing some slowness on our servers. Your request will eventually be
responded to.
</p>
</div>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('https://t1.staticdev.orguv.sw-handler.js', {
scope: '/'
}).then(() => {
let url = atob(decodeURIComponent(window.location.hash.slice(1)));
let search;
switch (localStorage.getItem('incog||search')) {
case 'google':
search = 'https://google.com/search?q='
break;
case 'ddg':
search = 'https://duckduckgo.com/?q='
break;
case 'bing':
search = 'https://bing.com/search?q='
break;
case 'brave':
search = 'https://search.brave.com/search?q='
break;
default:
localStorage.setItem('incog||search', 'google')
search = 'https://google.com/search?q='
};
if (url) {
if (!isUrl(url)) url = search + url;
else if (!(url.startsWith('https://') || url.startsWith('http://'))) { url = 'http://' + url; };
} else { url = new URL(search).origin }
window.location.href = __uv$config.prefix + __uv$config.encodeUrl(url);
});
} else {
document.querySelector('.lds-dual-ring').remove();
document.querySelector('.info').textContent = 'Your browser does not support service workers or is blocking them (private browsing mode?). Try swapping or updating your browser.'
};
function isUrl(val = '') {
if (/^http(s?):\/\//.test(val) || val.includes('.') && val.substr(0, 1) !== ' ') return true;
return false;
}
</script>
</body>
</html>