-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
executable file
·438 lines (438 loc) · 15.1 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
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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Parking Master 3.0</title>
<script type="text/javascript" src="https://npmcdn.com/parse/dist/parse.min.js"></script>
<style>
@font-face {
font-family: "GlacialIndifference";
src: url(fonts/GlacialIndifference.ttf);
}
body {
font-family: "Open Sans Light", Arial, Helvetica, sans-serif;
overflow: hidden !important;
background-image: url(./images/skid.png);
background-size: cover;
background-repeat: no-repeat;
background-color: #fff;
background-position-x: 15vw;
}
h1 {
font-family: "GlacialIndifference";
font-style: normal;
font-size: 7.638888888888889vw;
white-space: nowrap;
letter-spacing: 15px;
text-align: center;
color: #000;
}
h2 {
font-family: "GlacialIndifference";
font-style: normal;
font-size: 50px;
letter-spacing: 15px;
text-align: center;
margin: 0;
margin-bottom: -100px;
}
hr {
position: relative;
border: none !important;
outline: none !important;
height: 1px;
width: 27.77777777777778vw;
background: #000;
left: 50% !important;
margin-left: -475px;
margin-bottom: 100px;
}
button {
position: relative;
background: #fff;
border: 2px solid #000;
padding: 10px;
width: 200px;
height: 50px;
font-family: "Open Sans Light", Arial;
font-weight: 100;
font-size: 18px;
margin-left: 13.5%;
margin-bottom: 50px;
transition: transform .1s;
white-space: nowrap;
color: #333 !important;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.24);
}
button:hover {
transform: scale(1.1);
cursor: pointer;
}
#link-container {
position: absolute;
display: block;
margin-top: 150px;
text-align: center;
width: 200px;
left: 50%;
margin-left: -100px;
}
#link-container br {
margin-bottom: 25px;
}
a {
color: #000;
text-decoration: none;
border-bottom: 1px solid currentColor;
filter: invert(1);
mix-blend-mode: difference;
}
.transition {
position: absolute;
left: -100%;
top: -50%;
width: 100%;
background: #fff;
border-radius: 100%;
z-index: 9999;
object-fit: contain;
}
#multiplayer-frame {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
border: none;
background: #fff;
display: none;
}
#play-frame {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
border: none;
background: #fff;
display: none;
}
#vrs {
position: absolute;
width: 72%;
left: 50%;
margin-left: -36%;
}
* {
user-select: none !important;
}
iframe {
z-index: 9998;
}
.swal-overlay {
z-index: 500 !important;
}
.swal-button {
background: #333 !important;
box-shadow: none !important;
color: #fff !important;
width: 100% !important;
}
img {
pointer-events: none !important;
}
.loader {
position: absolute;
width: 100vw;
height: 100vh;
margin: 0;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
align-content: center;
margin: 0 !important;
left: 0 !important;
top: 0 !important;
right: 0 !important;
bottom: 0 !important;
z-index: 9999;
}
.loader-1 {
width: 8vmax;
height: 8vmax;
border-right: 4px solid #000;
border-radius: 100%;
animation: spinRight 800ms linear infinite;
margin: 0;
margin-top: -100px;
}
.loader-1:before, .loader-1:after {
content: "";
width: 6vmax;
height: 6vmax;
display: block;
position: absolute;
left: calc(50% - 3vmax);
border-left: 3px solid #000;
border-radius: 100%;
animation: spinLeft 800ms linear infinite;
}
.loader-1:after {
width: 4vmax;
height: 4vmax;
top: calc(50% - 2vmax);
left: calc(50% - 2vmax);
border: 0;
border-right: 2px solid #000;
animation: none;
}
@keyframes spinLeft {
from {
transform: rotate(0deg);
}
to {
transform: rotate(720deg);
}
}
@keyframes spinRight {
from {
transform: rotate(360deg);
}
to {
transform: rotate(0deg);
}
}
.banner {
transition: background 2s ease 1s !important;
}
</style>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script src="scripts/user/user.js"></script>
</head>
<body>
<style>body,html,*{cursor:none!important}#follower #circle1,#follower #circle2{cursor:none!important;position:absolute;border-radius:50%;height:0;width:0;margin-top:0;margin-left:0}*,body,html{cursor:none!important}#follower{position:absolute;top:50%;left:50%}#follower #circle1{-webkit-animation:2s infinite pulse;animation:2s infinite pulse;background:#fff}#follower #circle2{-webkit-animation:4s infinite pulse;animation:4s infinite pulse;background:rgba(0,0,0,.8)}@-moz-keyframes pulse{0%,100%{opacity:.2;height:1em;width:1em;margin-top:-.5em;margin-left:-.5em}50%{opacity:.9;height:3em;width:3em;margin-top:-1.5em;margin-left:-1.5em}}@-webkit-keyframes pulse{0%,100%{opacity:.2;height:1em;width:1em;margin-top:-.5em;margin-left:-.5em}50%{opacity:.9;height:3em;width:3em;margin-top:-1.5em;margin-left:-1.5em}}@-o-keyframes pulse{0%,100%{opacity:.2;height:1em;width:1em;margin-top:-.5em;margin-left:-.5em}50%{opacity:.9;height:3em;width:3em;margin-top:-1.5em;margin-left:-1.5em}}@keyframes pulse{0%,100%{opacity:.2;height:1em;width:1em;margin-top:-.5em;margin-left:-.5em}50%{opacity:.9;height:3em;width:3em;margin-top:-1.5em;margin-left:-1.5em}}</style>
<div style="position: fixed; left: 0; top: 0; bottom: 0; right: 0; width: 100%; height: 100%; margin: 0; background: #000; z-index: 99999999999999" class="banner"></div>
<video style="position: fixed; left: 0; top: 0; bottom: 0; right: 0; width: 100%; height: 100%; margin: 0; z-index: 9999999999999" autoplay src="intro.mp4" onload="document.querySelector('.banner').remove()"></video>
<script>
document.querySelector("video").onended = () => {
document.querySelector("video").remove();
document.querySelector(".banner").style.background = "transparent";
setTimeout(() => (document.querySelector('.banner').remove()), 2000);
}
</script>
<div id="follower" style="pointer-events:none;z-index:9997" class="cursor">
<div id="circle1"></div>
<div id="circle2"></div>
</div>
<!-- <div class="loader">
<div class="loader-1"></div>
<br>
<h2 style="font-size:20px;text-align:center;position:absolute;margin-top:100px;">LOADING</h2>
</div> -->
<script>(function(){var t,n,e,o;t=document.getElementById("follower"),document.getElementById("printout"),n=function(t){return t.clientX},e=function(t){return t.clientY},o=function(o){var u;return u={x:n(o),y:e(o)},t.style.top=u.y+"px",t.style.left=u.x+"px"},window.onmousemove=function(t){var n;return n=t,setTimeout((function(){return o(n)}),1)}}).call(this);</script>
<h1>PARKING MASTER</h1>
<h2>3.0</h2>
<div id="link-container">
<a href="downloads/">DOWNLOAD</a>
<br>
<a href="support.html">SUPPORT</a>
<br>
<a href="contact.html">CONTACT</a>
</div>
<img src="images/vrs.png" id="vrs">
<div style="margin-top:200px">
<button onclick="play()">PLAY</button>
<button style="margin-left:0;position:absolute;margin-right:13.5%!important;right:0!important" onclick="customize()">CUSTOMIZE</button>
<br>
<button onclick="multiplayer()">MULTIPLAYER</button>
<button style="margin-left:0;position:absolute;margin-right:13.5%!important;right:0!important" onclick="location.assign('support.html')">SUPPORT</button>
</div>
<img class="transition" src="images/wheel.png" />
<iframe src="multiplayer.html" id="multiplayer-frame"></iframe>
<iframe src="" id="play-frame"></iframe>
<script>
window.addEventListener("load", () => {
if (document.readyState == "complete") {
// document.querySelector(".loader").remove();
}
if (matchMedia("(pointer: coarse)").matches) {
document.querySelector(".cursor").style.display = "none";
}
});
Parse.initialize("sixz0SUXueXB5ag6LNjX7RcHk3KAQI8UCA3shKwh","09yqaddyyjykuIyeBHlNyTTnnXTS73ZryQNaB0vp"),Parse.serverURL="https://parseapi.back4app.com/";
function performance() {
let container = document.createElement("div");
let slider = document.createElement("input");
let sliderAmount = document.createElement("span");
container.appendChild(slider);
container.appendChild(sliderAmount);
slider.type = "range";
slider.value = localStorage["performance"] || 100;
let g = setInterval(() => { sliderAmount.textContent = (((slider.value-0)+250)*1.5).toFixed(0) + " MB" }, 100);
swal({
title: "Performance",
text: "Set the amount of performance the game takes.",
content: container
}).then((e) => {
clearInterval(g);
localStorage.setItem("performance", document.querySelector(".swal-content").querySelector("input").value);
});
}
function background() {
let container = document.createElement("div");
container.innerHTML = `
<input type="file">
`;
swal({
title: "Set new background",
text: "Upload a custom image",
content: container
}).then((e) => {
localStorage.setItem("performance", document.querySelector(".swal-content").querySelector("input").value);
function getBase64(file, callback) {
var reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = function() {
callback(reader.result);
};
reader.onerror = function (error) {
throw new Error(error);
};
}
let file = document.querySelector(".swal-content").querySelector("input").files[0];
getBase64(file, (image) => {
new Parse.Query(Parse.Object.extend("User")).find("objectId").then(e => {
for (let t = 0; t < e.length; t++) {
let r = new Parse.User;
r.set("objectId", e[t].id);
if (r.get("username") == localStorage["u-username"]) {
let user = r;
user.set("backgroundImage", image);
user.save().then((e) => {
console.log(e);
});
}
}
});
});
});
}
if (localStorage["u-username"] && localStorage["u-password"]) {
new Parse.Query(Parse.Object.extend("User")).find("objectId").then(e => {
for (let t = 0; t < e.length; t++) {
let r = new Parse.User;
r.set("objectId", e[t].id);
if (r.get("username") == localStorage["u-username"]) {
let user = r;
if (user.get("backgroundImage")) {
document.body.style.backgroundPosition = "0 0";
document.body.style.backgroundImage = "url(" + user.get("backgroundImage") + ")";
}
}
}
});
}
function clearData() {
swal({
title: "Are you sure?",
text: "Clearing data will log you out, remove cookies and\nall temporary data. Do you want to continue?",
buttons: ["Cancel", "Continue"]
}).then((e) => {
if (e) {
(()=>{for(var e=document.cookie.split(";"),o=0;o<e.length;o++){var i=e[o],n=i.indexOf("="),t=n>-1?i.substr(0,n):i;document.cookie=t+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}})();
localStorage.clear();
sessionStorage.clear();
location.reload(true);
}
});
}
function logIn() {
location.assign("login.html");
}
function logOut() {
Parse.User.logOut();
localStorage.clear();
userMan.logOut(true);
}
function customizeInfo() {
if (userMan.isLoggedIn) {
location.assign("account.html");
}
}
function customize() {
let container = document.createElement("div");
container.innerHTML = `
<a onclick="performance()">Performance</a>
<br>
<br>
<a onclick="background()">Background</a>
<br>
<br>
<a onclick="clearData()">Clear data</a>
<br>
<br>
<a onclick="logOut()">Log out user</a>
<br>
<br>
<a onclick="logIn()">Log in user</a>
<br>
<br>
<a onclick="customizeInfo()">User info</a>
<br>
<div class="swal-title">Other places</div>
<br>
<a onclick="location.assign('users/')">All users</a>
<br>
<br>
<a onclick="location.assign('shop.html')">The shop</a>
<br>
<br>
<a onclick="location.assign('my-license.html')">My License</a>
`;
swal({
title: "Customize/Settings",
content: container
});
}
function multiplayer() {
let t = -100;
let h = setInterval(() => {
if (t >= 150) {
return document.querySelector(".transition").style.left = "-100%", document.querySelector(".transition").style.transform = "rotate(0deg)", clearInterval(h);
}
if (t >= 10) {
document.querySelector("#multiplayer-frame").style.display = "block";
}
t += .3;
document.querySelector(".transition").style.left = (t - 5) + "%";
document.querySelector(".transition").style.transform = "rotate(" + (t - 3) + "deg)";
});
}
function play() {
document.querySelector("#play-frame").src = "levels/level0.html";
document.querySelector("#play-frame").style.display = "block";
}
window.addEventListener("message", (e) => {
if (e.data == "rmframe") {
location.reload();
}
});
if (new URLSearchParams(location.search).get("m")) {
swal({
icon: "warning",
text: atob(new URLSearchParams(location.search).get("m"))
});
}
</script>
</body>
</html>