-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
212 lines (185 loc) · 6.14 KB
/
index.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html lang="en">
<head>
<title>ViewTurbo</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="keywords" content="viewturbo,ViewTurbo">
<meta name="description"
content="A top-tier network tool that enhances your browsing speed and simplifies access to any sites">
<style>
body {
margin: 0;
padding: 0;
font-family: 'Roboto', sans-serif;
background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
color: #ffffff;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
#container {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
}
#app {
font-size: 1.5rem;
margin-bottom: 20px;
background: linear-gradient(135deg, #ffffff, #ff6f61);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: fadeIn 1.5s ease-in-out, gradientMove 3s infinite linear;
}
#buttonContainer {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 15px;
margin-top: 20px;
}
button {
width: 160px;
height: 48px;
font-size: 1rem;
font-weight: bold;
color: #ffffff;
background: linear-gradient(135deg, #1e88e5, #005cb2);
border: none;
border-radius: 12px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
button:hover {
background: linear-gradient(135deg, #005cb2, #004494);
transform: translateY(-3px);
box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}
button:active {
background: linear-gradient(135deg, #004494, #002b6f);
transform: translateY(0);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.spinner {
width: 50px;
height: 50px;
border: 5px solid rgba(255, 255, 255, 0.3);
border-top: 5px solid #ffffff;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes fadeIn {
0% {
opacity: 0;
transform: translateY(10px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes gradientMove {
0% {
background-position: 0% 50%;
}
100% {
background-position: 100% 50%;
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div id="container">
<div id="loader" style="display: none;">
<div class="spinner"></div>
</div>
<div id="app">Now Loading the latest site</div>
<div id="buttonContainer"></div>
</div>
<script>
function isHTTPS(url) {
var parsedUrl = new URL(url);
return parsedUrl.protocol === 'https:';
}
function CreateButton(button_text, open_func) {
var button = document.createElement("button");
button.innerHTML = button_text;
button.addEventListener("click", open_func);
var container = document.getElementById("buttonContainer");
container.appendChild(button);
}
function OpenLink(url) {
var path = window.location.pathname
.replace("/OfficialSiteJump", "")
.replace("/web", "");
if (path === "") {
path = "/";
}
window.location.assign(url + path + window.location.search);
}
async function checkConnection(urllist) {
try {
for (var i = 0; i < urllist.length; ++i) {
var url = urllist[i];
console.log(url);
const controller = new AbortController();
const signal = controller.signal;
setTimeout(() => controller.abort(), 5000);
const response = await fetch(url, { signal });
if (response.ok) {
OpenLink(url);
return;
}
}
} catch (error) {
console.log(error);
}
document.getElementById("app").textContent = "Please go to Google to search the latest site";
}
function startCountdown(finished_func) {
var seconds = 5;
document.getElementById("loader").style.display = "block";
function countdown() {
if (seconds > 0) {
document.getElementById("app").textContent = "Please wait " + seconds + "s";
seconds--;
setTimeout(countdown, 1000);
} else {
document.getElementById("loader").style.display = "none";
finished_func();
}
}
countdown();
}
var link1 = "https://web.vtfly.com";
var link2 = "https://web.viewturbo.com";
CreateButton("Address 1", () => { OpenLink(link1); });
CreateButton("Address 2", () => { OpenLink(link2); });
if (!isHTTPS(window.location.href)) {
startCountdown(() => {
checkConnection([link1, link2]);
});
} else {
startCountdown(() => {
OpenLink(link1);
});
}
</script>
</body>
</html>