-
Notifications
You must be signed in to change notification settings - Fork 138
/
Website.html
297 lines (230 loc) · 6.52 KB
/
Website.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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
<link rel="icon" href="https://github.com/sz-games/home/blob/main/G.png?raw=true">
<title>Sz Games | Loader</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 0;
overflow: hidden;
font-family: Arial, Helvetica, sans-serif;
}
.btn-group button {
background-color: black; /* Green background */
color: white; /* White text */
padding: 10px 24px; /* Some padding */
cursor: pointer; /* Pointer/hand icon */
float: left; /* Float the buttons side by side */
}
/* Clear floats (clearfix hack) */
.btn-group:after {
content: "";
clear: both;
display: table;
}
.btn-group button:not(:last-child) {
border-right: none; /* Prevent double borders */
}
/* Add a background color on hover */
.btn-group button:hover {
background-color: grey;
}
/* Header/Logo Title */
.header {
padding: 60px;
text-align: center;
background: linear-gradient(to bottom right, #9a9a9a, rgb(39, 39, 39));
color: white;
width: auto;
font-size: 30px;
border-radius: 15px;
}
/* Page Content */
#loading-screen {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
transition: 0.8s;
z-index: 9999;
}
#loading-indicator {
border: 6px solid #f3f3f3;
border-radius: 50%;
border-top: 6px solid #222222;
width: 20px;
right: 100px;
height: 20px;
position: absolute;
-webkit-animation: spin 0.8s linear infinite; /* Safari */
animation: spin 0.8s linear infinite;
z-index: 9999;
/* Add styles for your loading indicator here */
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading-bar {
width: 80%;
height: 10px;
background-color: #d8d8d8;
border-radius: 5px;
overflow: hidden;
}
.loading-progress {
height: 10px;
background: linear-gradient(to right, purple, red);
animation: gradient 0.7s linear infinite;
width: 0%;
border-radius: 20px;
transition: width 0.5s ease-in-out;
}
@keyframes gradient {
0% {
background-position: left;
}
100% {
background-position: right;
}
}
.loading-text {
font-size: 24px;
margin-top: 20px;
}
body.loading #loading-screen {
display: flex;
}
body.loading #content {
opacity: 0.3;
}
</style>
</head>
<body onresize="resize()">
<style>
.game {
position: absolute;
color: white;
transform: scale(1.8);
z-index: 3;
font-family: Arial, Helvetica, sans-serif;
}
.fade {
position: absolute;
background: linear-gradient(to bottom, #1d1d1d, #1d1d1d5d, rgba(39, 39, 39, 0));
width: 300px;
height: 150px;
border-radius: 15px;
}
</style>
<div id="loading-ind">
<div id="loading-indicator"></div>
<h3 style="position: absolute; right: 5px; top: -12px; font-family: Arial, Helvetica, sans-serif;">Loading...</h3>
</div>
<div id="loading-screen">
<div class="loading-bar">
<div class="loading-progress"></div>
</div>
<div id="loading-text" class="loading-text">Loading...</div>
</div>
<iframe frameBorder="0" id="game" style="text-align: center; align-items: center; overflow: hidden; width: 100%; " src="" allowfullscreen></iframe>
<h2 onclick="window.location = 'https://sz-games.github.io/unblock.html'" style="cursor: pointer; position: fixed; bottom: -20px; ">Back</h2>
<h2 style="position: fixed; bottom: 10px;">____</h2>
<h2 onclick="makeFullScreen()" style="cursor: pointer; position: fixed; bottom: 20px;">Fullscreen</h2>
</body>
<script>
var currentUrl = new URL(window.location.href);
var textElement = document.getElementById("game");
var loadtext = document.getElementById("loading-text");
var progressBar = document.querySelector(".loading-progress");
var iframeg = document.getElementById('port');
var loadingIndicator = document.getElementById('loading-ind');
var percent = 0;
var number = 1;
var iframeUrl = textElement.contentWindow.location.href;
setInterval(() => {
if (iframeUrl.indexOf("kazwire.com") !== -1) {
//console.log(iframeUrl)
console.log('Outside')
textElement.contentWindow.location.href = currentUrl.searchParams.get("game");
} else {
console.log('inside')
// console.log(iframeUrl)
}
}, 1500);
loadingIndicator.style.display = "none";
setInterval(function() {
//percent += 10;
progressBar.style.width = percent + "%";
if (percent >= 100) {
clearInterval();
document.getElementById('loading-screen').style.opacity = 0;
setTimeout(() => {
document.getElementById('loading-screen').style.display = 'none'
}, 800);
}
}, 100);
percent += 20;
loadtext.innerHTML = "Connecting To The Server..."
step2();
function step2() {
if (number===1) {
textElement.src = currentUrl.searchParams.get("game");
loadtext.innerHTML = "Launching..."
setTimeout(() => {
percent += 100;
}, 1500);
number++
}
}
document.body.onkeyup = function(e) {
if( e.keyCode == 27 ) {
document.getElementById('game').style.width = '800px';
}
}
function requestFullScreen(element) {
// Supports most browsers and their versions.
var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen;
if (requestMethod) { // Native full screen.
requestMethod.call(element);
let hh = window.innerHeight - 10;
document.getElementById('game').height = hh;
} else if (typeof window.ActiveXObject !== "undefined") { // Older IE.
var wscript = new ActiveXObject("WScript.Shell");
if (wscript !== null) {
wscript.SendKeys("{F11}");
}
}
}
var canvas = document.getElementById('game');
function makeFullScreen() {
requestFullScreen(canvas);
}
let hh = window.innerHeight - 10;
document.getElementById('game').height = hh;
window.onresize = function(event) {
let hh = window.innerHeight - 10;
document.getElementById('game').height = hh;
}
// Get the text element
// Get the current URL
// Check for the presence of the "text" parameter in the URL
if (currentUrl.searchParams.has("game")) {
// Set the text of the element to the value of the "text" parameter
}
console.log(currentUrl.searchParams.get("game"))
</script>
</html>