-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathredirect.html
More file actions
82 lines (79 loc) · 2.17 KB
/
redirect.html
File metadata and controls
82 lines (79 loc) · 2.17 KB
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
<!DOCTYPE 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">
Crazystuff is redirecting... wait for a few seconds.
</p>
</div>
<script>
window.navigator.serviceWorker.register('./uv.sw-handler.js', {
scope: __uv$config.prefix
}).then(() => {
let url = atob(window.location.hash.slice(1));
if (!isUrl(url)) url = 'https://search.brave.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);
});
function isUrl(val = ''){
if (/^http(s?):\/\//.test(val) || val.includes('.') && val.substr(0, 1) !== ' ') return true;
return false;
};
</script>
</body>
</html>