forked from caracal-js/Incognito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
load.html
97 lines (92 loc) · 2.84 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
<!DOCTYPE html>
<html>
<head>
<script src="./uv/uv.bundle.js"></script>
<script src="./uv/uv.config.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans&family=Roboto&display=swap');
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('./uv.sw-handler.js', {
scope: '/'
}).then(() => {
let url = atob(
decodeURIComponent(window.location.hash.slice(1))
);
if (!isUrl(url)) url = 'https://www.google.com/search?q=' + url;
else if (!(url.startsWith('https://') || url.startsWith('http://'))) {
url = 'http://' + url;
};
window.location.href = __uv$config.prefix + __uv$config.encodeUrl(
url
);
});
} else {
document.querySelector('.lds-dual-ring').remove();
document.querySelector('.info').textContent = 'Your browser appears to be in private browsing mode or is not compatabile. 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>