-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
spa.html
628 lines (626 loc) · 26.4 KB
/
spa.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
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
<!DOCTYPE html>
<html lang="en" prefix="og: https://ogp.me/ns#">
<head>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#000000">
<meta name="theme-color" content="#000">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<meta property="og:image" content="/assets/preview/default.png"/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://techlore.tech/spa.html"/>
<meta property="og:title" content="Techlore: Digital Rights for All"/>
<meta property="og:description" content="A security, privacy, and anonymity quiz to evaluate how safe you are online."/>
<link rel="stylesheet" href="assets/css/style.css?t=129" type="text/css">
<title> Techlore | Anonymity Quiz </title>
<meta name="description"
content="A security, privacy, and anonymity quiz to evaluate how safe you are online." />
<meta itemprop="name" content=" Techlore | Anonymity Quiz ">
<meta itemprop="description"
content="A security, privacy, and anonymity quiz to evaluate how safe you are online.">
<meta itemprop="image" content="./assets/svg/logo_v2.svg">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content=" Techlore | Digital Rights for All ">
<meta name="twitter:description"
content="A security, privacy, and anonymity quiz to evaluate how safe you are online.">
<meta name="twitter:image" content="./assets/svg/logo_v2.svg">
<base target="_blank">
<style>
:root {
--c1: #0074d9;
--c2: #414141;
}
body {
background: linear-gradient(#1126becc, #05c7adcc);
}
h2,
h1 {
margin: 0;
}
main {
user-select: none;
}
div.lb {
margin: 15px 0;
background: ghostwhite;
border-radius: .3rem;
}
#zone_1 div.lb {
border: 2px solid var(--green);
color: var(--grey);
}
#zone_2 div.lb {
border: 2px solid var(--yellow);
color: var(--grey);
}
#zone_3 div.lb {
border: 2px solid var(--orange);
color: var(--grey);
}
button {
border: .1rem solid var(--c1);
color: var(--c1);
}
button:not([disabled]):hover {
color: #fcfcfc;
background: var(--c1);
}
label {
margin-left: 25px;
display: block;
padding: 10px;
}
input[type=checkbox]:checked,
input[type=radio]:checked {
background: var(--c1);
border-color: var(--c1);
}
#checks-box h4 {
margin-top: 0;
}
#result-box h3 {
text-align: center;
}
.tab,
#zone_2,
#zone_3,
#result-box,
#checks-box {
display: none;
}
.step {
height: 20px;
width: 20px;
margin: 0 2px;
background-color: #fff;
border: 2px solid;
border-radius: 50%;
display: inline-block;
}
.step.active {
border-color: var(--c1);
background-color: var(--c1);
}
.brasil {
position: relative;
color: #fff;
max-width: 1200px;
margin: 0 auto;
}
.brasil::before,
.brasil::after {
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.brasil::before {
left: 2px;
clip: rect(79px, 1200px, 86px, 0);
text-shadow: -1px 0 red;
background: transparent;
animation: brasil-anim-2 1s infinite linear alternate-reverse;
}
.brasil::after {
left: -2px;
clip: rect(79px, 1200px, 86px, 0);
text-shadow: -1px 0 #0074d9;
background: transparent;
animation: brasil-anim-1 1s infinite linear alternate-reverse;
animation-delay: -1s;
}
@keyframes brasil-anim-1 {
0% {
clip: rect(0px, 1200px, 76px, 0);
}
20% {
clip: rect(19px, 1200px, 16px, 0);
}
40% {
clip: rect(16px, 1200px, 3px, 0);
}
60% {
clip: rect(62px, 1200px, 78px, 0);
}
80% {
clip: rect(25px, 1200px, 13px, 0);
}
100% {
clip: rect(53px, 1200px, 86px, 0);
}
}
@keyframes brasil-anim-2 {
0% {
clip: rect(79px, 1200px, 86px, 0);
}
20% {
clip: rect(20px, 1200px, 30px, 0)
}
40% {
clip: rect(25px, 1200px, 5px, 0)
}
60% {
clip: rect(65px, 1200px, 85px, 0)
}
80% {
clip: rect(120px, 1200px, 145px, 0)
}
100% {
clip: rect(95px, 1200px, 75px, 0)
}
}
section+section {
margin-top: .5rem;
}
section {
position: relative;
background: var(--black-t);
color: var(--white);
border-radius: .3rem;
box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(0, 0, 0, .23);
}
.results h2 {
background: #0074d9;
padding: .5rem;
text-align: center;
color: #fefefe;
border-radius: .3rem;
display: none;
}
.results {
max-width: 300px;
margin: auto;
margin-top: 1rem;
margin-bottom: 10px;
}
details {
max-width: 300px;
margin: auto;
}
#rs-info {
display: none;
}
.progressB,
.progressY,
.progressG,
.progressR {
text-align: center;
}
.progressB .circle-progress {
width: 200px;
height: auto;
}
.progressB .circle-progress-value {
stroke: #0074d9;
}
.progressG .circle-progress-value {
stroke: #21bf73;
}
.progressY .circle-progress-value {
stroke: #ffcd38;
}
.progressR .circle-progress-value {
stroke: #ff3838;
}
.circle-progress-value {
stroke-width: 6px;
stroke-linecap: round;
}
.circle-progress-circle {
stroke-width: 2px;
stroke: #555;
}
.circle-progress-text {
fill: var(--white);
}
</style>
<noscript>
<style>
[class*=_aos],
._aos {
opacity: 1 !important;
transform: translate3d(0px, 0px, 0px) !important;
}
</style>
</noscript>
</head>
<body id="tools">
<nav>
<input type="checkbox" id="menu-btn"/>
<label for="menu-btn"><span></span></label>
<ul>
<li><a target="_self" href="./index.html">Home</a></li>
<li><a target="_self" href="./about.html">About</a></li>
<li><a target="_self" href="./videos.html"> Videos </a></li>
<li><a target="_self" href="./goincognito.html">Go Incognito</a></li>
<li><a target="_self" href="https://discuss.techlore.tech/">Forum</a></li>
<li><a target="_self" href="https://blog.techlore.tech"> Blog </a></li>
<li><a target="_self" href="./resources.html">Resources</a></li>
<li><a target="_self" href="./support.html">Support Us</a></li>
<li class="social-cnt">
<div><a href="https://github.com/techlore" target="_blank" rel="me"><img alt="github"
src="assets/svg/github.svg"></a>
</div>
<div><a href="https://www.patreon.com/techlore" target="_blank" rel="me"><img alt="patreon"
src="assets/svg/patreon.svg"></a>
</div>
<div><a href="https://social.lol/@techlore" target="_blank" rel="me"><img alt="mastodon"
src="assets/svg/mastodon.svg"></a>
</div>
<div><a href="https://discuss.techlore.tech/t/signal-usernames-are-here-join-our-signal-group-techlore/7640" target="_blank" rel="me"><img alt="signal"
src="assets/logos/signal.svg"></a>
</div>
<div><a href="./rss.html" target="_self" rel="me"><img alt="RSS"
src="assets/svg/rss.svg"></a>
</div>
</li>
</ul>
</nav>
<svg viewBox="0 0 120 15" class="wavet">
<path class="wave"
d="M 0 0 v 6 C 30 6 30 10 60 10 C 91 10 90 6 120 6 C 150 6 150 10 180 10 C 210 10 210 6 240 6 v -6 h -240 z" />
</svg>
<main class="_pt0 _mb4">
<section id="main-box" class="_centered">
<h1 class="brasil" data-text="Anonymity Quiz">Anonymity Quiz 🕵️</h1>
<h5 class="game-rules-copy"><i>Test your security, privacy and anonymity</i></h5>
<button class="play-button _mt4" id="quiz-game-btn"> Start <i class="fa fa-caret-right"
aria-hidden="true"></i></button><br>
<a href="https://discuss.techlore.tech/pub/sponsors"><img class="sponsor" alt="Privacy Quiz sponsor logo" src="./assets/sponsorlogo.png"></a>
</section>
<section id="checks-box">
<div class="_centered" id="steps"><span class="step active"></span><span class="step"></span></div>
<div id="zone_1">
<h1> Zone 1 <h4><i>Basic</i></h4>
</h1>
<div class="tab">
<div class="lb"><label for="ans0"><input type="checkbox" value="5" id="ans0" class="ans"> Use a password manager<a href="./resources.html#password-managers"> <i>(Password Managers)</i></a></label></div>
<div class="lb"><label for="ans1"><input type="checkbox" value="5" id="ans1" class="ans"> Use a strong password for device log-ins</label></div>
<div class="lb"><label for="ans2"><input type="checkbox" value="5" id="ans2" class="ans"> Use a strong router password</label></div>
<div class="lb"><label for="ans3"><input type="checkbox" value="5" id="ans3" class="ans"> Use 2FA on available services<a href="./resources.html#totp"> <i>(2FA Options)</i></a></label></div>
</div>
<div class="tab">
<div class="lb"><label for="ans4"><input type="checkbox" value="5" id="ans4" class="ans"> Disable Google tracking on <a href="https://myactivity.google.com/">MyActivity</a> page</label></div>
<div class="lb"><label for="ans5"><input type="checkbox" value="5" id="ans5" class="ans"> Delete and minimize unused accounts</label></div>
<div class="lb"><label for="ans6"><input type="checkbox" value="5" id="ans6" class="ans"> Utilize privacy settings on all your accounts to stay safe</label></div>
<div class="lb"><label for="ans7"><input type="checkbox" value="5" id="ans7" class="ans"> Use a good, quality VPN and/or Tor<a href="./resources.html#vpn"> <i>(VPN Options)</i></a></label>
</div>
</div>
<div class="tab">
<div class="lb"><label for="ans8"><input type="checkbox" value="5" id="ans8" class="ans"> Use secure, end-to-end encrypted messaging<a href="./resources.html#messengers"> <i>(Messengers)</i></a></label></div>
<div class="lb"><label for="ans9"><input type="checkbox" value="5" id="ans9" class="ans"> Use secure and encrypted email<a href="./resources.html#email"> <i>(Email Providers)</i></a></label></div>
<div class="lb"><label for="ans10"><input type="checkbox" value="5" id="ans10" class="ans"> Use only trusted web extensions</label></div>
<div class="lb"><label for="ans11"><input type="checkbox" value="5" id="ans11" class="ans"> Use a privacy-respecting search engine<a href="./resources.html#search"> <i>(Search Engines)</i></a></label></div>
</div>
<div class="tab">
<div class="lb"><label for="ans12"><input type="checkbox" value="5" id="ans12" class="ans"> Frequently clear or never store browser data</label></div>
<div class="lb"><label for="ans13"><input type="checkbox" value="5" id="ans13" class="ans"> Utilize private & secure browser protections</label></div>
<div class="lb"><label for="ans14"><input type="checkbox" value="5" id="ans14" class="ans"> Opt out of phone OS analytics/tracking</label></div>
<div class="lb"><label for="ans15"><input type="checkbox" value="5" id="ans15" class="ans"> Disable unused phone radios (NFC/WiFi/BT,etc.)</label></div>
</div>
<div class="tab">
<div class="lb"><label for="ans16"><input type="checkbox" value="5" id="ans16" class="ans"> Disable and minimize unused phone functions</label></div>
<div class="lb"><label for="ans17"><input type="checkbox" value="5" id="ans17" class="ans"> Opt out of computer OS analytics/tracking</label></div>
<div class="lb"><label for="ans18"><input type="checkbox" value="5" id="ans18" class="ans"> Disable unused computer radios (NFC/WiFi/BT,etc.)</label></div>
<div class="lb"><label for="ans19"><input type="checkbox" value="5" id="ans19" class="ans"> Disable and minimize unused computer features</label></div>
<div class="lb"><label for="ans20"><input type="checkbox" value="5" id="ans20" class="ans"> Clear device temporary data (Cache, Cookies, Logs, etc.)</label></div>
</div>
<div class="tab">
<div class="lb"><label for="ans21"><input type="checkbox" value="5" id="ans21" class="ans"> Shred deleted files and data</label></div>
<div class="lb"><label for="ans22"><input type="checkbox" value="5" id="ans22" class="ans"> Backup your data consistently</label></div>
<div class="lb"><label for="ans23"><input type="checkbox" value="5" id="ans23" class="ans"> Avoid public computers</label></div>
<div class="lb"><label for="ans24"><input type="checkbox" value="5" id="ans24" class="ans"> Avoid IOT &Smart Devices</label></div>
<div class="lb"><label for="ans25"><input type="checkbox" value="5" id="ans25" class="ans"> Utilize a safe & shredder</label></div>
</div>
</div>
<div id="zone_2">
<h1> Zone 2 <h4><i>Moderate</i></h4>
</h1>
<div class="tab">
<div class="lb"><label for="ans26"><input type="checkbox" value="6" id="ans26" class="ans"> Disable all biometrics (Or have good reason to use them)</label></div>
<div class="lb"><label for="ans27"><input type="checkbox" value="6" id="ans27" class="ans"> Delete Google altogether</label></div>
<div class="lb"><label for="ans28"><input type="checkbox" value="6" id="ans28" class="ans"> Utilize pseudonyms to offload personal data</label></div>
<div class="lb"><label for="ans29"><input type="checkbox" value="6" id="ans29" class="ans"> Use privately-obtained phone numbers and/or aliases</label></div>
<div class="lb"><label for="ans30"><input type="checkbox" value="6" id="ans30" class="ans"> Delete all personal social media</label></div>
</div>
<div class="tab">
<div class="lb"><label for="ans31"><input type="checkbox" value="6" id="ans31" class="ans"> Use only private and secure browsers<a href="./resources.html#desktop-browsers"> <i>(Browsers)</i></a></label></div>
<div class="lb"><label for="ans32"><input type="checkbox" value="6" id="ans32" class="ans"> Utilize multiple browsers for different tasks<a href="./resources.html#desktop-browsers"> <i>(Browsers)</i></a></label></div>
<div class="lb"><label for="ans33"><input type="checkbox" value="6" id="ans33" class="ans"> Move to as many FOSS alternatives as possible<a href="https://alternativeto.net"> <i>(AlternativeTo.net)</i></a></label>
</div>
<div class="lb"><label for="ans34"><input type="checkbox" value="6" id="ans34" class="ans"> Ditch type 1 Android (Samsung, HTC, etc.)</label></div>
<div class="lb"><label for="ans35"><input type="checkbox" value="6" id="ans35" class="ans"> Secure your computer BIOS</label></div>
</div>
<div class="tab">
<div class="lb"><label for="ans36"><input type="checkbox" value="6" id="ans36" class="ans"> Use full disk encryption</label></div>
<div class="lb"><label for="ans37"><input type="checkbox" value="6" id="ans37" class="ans"> Spoof MAC address</label></div>
<div class="lb"><label for="ans38"><input type="checkbox" value="6" id="ans38" class="ans"> Strip all OS telemetry/analytics</label></div>
<div class="lb"><label for="ans39"><input type="checkbox" value="6" id="ans39" class="ans"> Ditch Windows<a href="./resources.html#desktop-OS"> <i>(Operating Systems)</i></a></label></div>
<div class="lb"><label for="ans40"><input type="checkbox" value="6" id="ans40" class="ans"> Delete file metadata & EXIF</label></div>
</div>
<div class="tab">
<div class="lb"><label for="ans41"><input type="checkbox" value="6" id="ans41" class="ans"> Implement strong home security</label></div>
<div class="lb"><label for="ans42"><input type="checkbox" value="6" id="ans42" class="ans"> Use cable locks & intrusion kits for devices</label></div>
<div class="lb"><label for="ans43"><input type="checkbox" value="6" id="ans43" class="ans"> Completely ditch IOT & smart devices</label></div>
<div class="lb"><label for="ans44"><input type="checkbox" value="6" id="ans44" class="ans"> Use privacy screen protectors</label></div>
<div class="lb"><label for="ans45"><input type="checkbox" value="6" id="ans45" class="ans"> Use camera covers</label></div>
</div>
</div>
<div id="zone_3">
<h1> Zone 3 <h4><i>Advanced</i></h4>
</h1>
<div class="tab">
<div class="lb"><label for="ans46"><input type="checkbox" value="7" id="ans46" class="ans"> Fully clean & minimize your online digital footprint</label></div>
<div class="lb"><label for="ans47"><input type="checkbox" value="7" id="ans47" class="ans"> Delete all social media</label></div>
<div class="lb"><label for="ans48"><input type="checkbox" value="7" id="ans48" class="ans"> Utilize hardened and most trusted browsers<a href="./resources.html#desktop-browsers"> <i>(Browsers)</i></a></label></div>
<div class="lb"><label for="ans49"><input type="checkbox" value="7" id="ans49" class="ans"> Use Custom ROMs/Dumb Phones (Be aware of their limitations especially regarding SMS) </label></div>
</div>
<div class="tab">
<div class="lb"><label for="ans50"><input type="checkbox" value="7" id="ans50" class="ans"> Use Private/Secure Desktop OS(s) <a href="./resources.html#desktop-OS"> <i>(Operating Systems)</i></a></label></div>
<div class="lb"><label for="ans51"><input type="checkbox" value="7" id="ans51" class="ans"> Shop online and in-person privately<a href="./resources.html"> <i>(Shopping Services)</i></a></label></div>
<div class="lb"><label for="ans52"><input type="checkbox" value="7" id="ans52" class="ans"> Physically remove cameras/mics</label></div>
<div class="lb"><label for="ans53"><input type="checkbox" value="7" id="ans53" class="ans"> Avoid facial recognition/AI in public</label></div>
</div>
</div>
<div style="overflow:auto;">
<div style="float:right;">
<button type="button" id="prevBtn"><i class="fas fa-angle-left"></i> Previous</button>
<button type="button" id="nextBtn">Next</button>
</div>
</div>
</section>
<section id="result-box">
<div class="row keep-width _al-centered">
<div>
<h3>Zone 1</h3><br>
<div class="progressG"></div>
</div>
<div>
<h3>Zone 2</h3><br>
<div class="progressY"></div>
</div>
<div>
<h3>Zone 3</h3><br>
<div class="progressR"></div>
</div>
</div><br>
<div class="progressB"></div><br>
<div class="results _al-centered">
<h2 id="rs1"> Weak </h2>
<h2 id="rs2"> Below Average </h2>
<h2 id="rs3"> Techlore Approved </h2>
<h2 id="rs4"> Above & Beyond </h2>
<h2 id="rs5"> Techlore Max </h2>
</div>
<details>
<summary>
<small>Ranking Explained</small>
</summary>
<div>
<h5><u><b>0-50</b></u> | <i>Weak</i></h5>
<h5><u><b>50-150</b></u> | <i>Below Average</i></h5>
<h5><u><b>150-220</b></u> | <i>Techlore Approved</i></h5>
<h5><u><b>220-300</b></u> | <i>Above & Beyond</i></h5>
<h5><u><b>300+</b></u> | <i>Techlore Max</i></h5>
</div>
</details>
<hr><br>
<div id="rs-info" class="_centered">
<h1>Improve Your Score 💯</h1><br>
<div class="grid">
<div class="col-4 _flex-center">
<iframe width="250" height="160" src="https://www.youtube-nocookie.com/embed/a1i-3xwcSGA" frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
<div class="col-4 _g-center">
<img class="_wh-130" src="assets/svg/goincognito.svg">
<div class="links">
<a href="goincognito" target="_self">Go Incognito</a>
</div>
</div>
<div class="col-4 _g-center">
<img class="_wh-130" src="assets/svg/logo.svg">
<div class="links">
<a href="./resources.html" target="_self">Resources</a>
</div>
</div>
</div>
<br>
<a href="https://discuss.techlore.tech/pub/sponsors"><img class="sponsor" src="./assets/sponsorlogo.png"></a>
</div>
</section>
</main>
<svg xmlns="http://www.w3.org/2000/svg" id="waveb" class="waveb" version="1.0" viewBox="0 0 120 16">
<path d="M-.1 4.48c30 0 30 4.07 60 4.07s30-4.07 60-4.07 30 4.07 60 4.07 30-4.07 60-4.07v12.21H-.1z" class="wave" />
</svg>
<footer>
<div class="col-3 _flex-center">
Techlore © <script>document.write(new Date().getFullYear())</script> | <a href="./contact.html" class="footerURL">Contact</a> |<a href="./privacy.html" class="footerURL"> Privacy</a>
<a href="https://www.eff.org/">
<img alt="EFF Member" style="width:44px;height:44px;" src="assets/svg/eff.svg">
</a>
</div></div>
</footer>
<div class="gt-link hide" id="gt-link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6">
<path d="M12 6H0l6-6z" /></svg>
</a>
</body>
<script src="assets/javascript/circle-progress.min.js"></script>
<script src="assets/javascript/script.js"></script>
<script>
$(document).ready(() => {
$('#nextBtn').on("click", () => {
nextPrev(1);
});
var paddingB = document.getElementById('waveb').clientHeight;
document.body.style.paddingBottom = paddingB + 100 + "px";
$('#prevBtn').on("click", () => {
nextPrev(-1);
});
var zones = {
"zSteps1": 6,
"zSteps2": 4,
"zSteps3": 2
};
const cProgressB = new CircleProgress(".progressB", {
max: 306,
value: 0,
animationDuration: 1000
});
const cProgressG = new CircleProgress(".progressG", {
max: 130,
value: 0,
animationDuration: 1000
});
const cProgressY = new CircleProgress(".progressY", {
max: 120,
value: 0,
animationDuration: 1000
});
const cProgressR = new CircleProgress(".progressR", {
max: 56,
value: 0,
animationDuration: 1000
});
var activeZoneTabs = 1;
var currentTab = 0;
function wait(ms) {
let start = new Date().getTime();
let end = start;
while (end < start + ms) {
end = new Date().getTime();
}
}
$("#quiz-game-btn").on("click", function () {
$('#main-box').fade("out", () => {
document.body.style.setProperty("--c1", "#22bf73");
$('#checks-box').fade("in")
});
$("body").css("background", "linear-gradient(#216b5b,#21bf73)");
createSteps(1);
showTab(currentTab); // Display the current tab
});
function createSteps(n) {
var str = "";
for (let index = 0; index < zones["zSteps" + n]; index++)
str += '<span class="step"></span>';
$('#steps').html(str);
}
function showTab(n) {
var x = document.querySelectorAll("#zone_" + activeZoneTabs + ">.tab");
x[n].style.display = "block";
//... and fix the Previous/Next buttons:
if (n == 0) {
document.getElementById("prevBtn").style.display = "none";
} else {
document.getElementById("prevBtn").style.display = "inline";
}
if (n == (x.length - 1)) {
if (activeZoneTabs == 3)
document.getElementById("nextBtn").innerHTML = "Results";
else
document.getElementById("nextBtn").innerHTML = "Zone " + (activeZoneTabs + 1);
} else {
document.getElementById("nextBtn").innerHTML = 'Next <i class="fas fa-angle-right"></i>';
}
activeStep(n);
}
function nextPrev(n) {
var x = document.querySelectorAll("#zone_" + activeZoneTabs + ">.tab");
x[currentTab].style.display = "none";
currentTab = currentTab + n;
if (currentTab >= x.length) {
if (activeZoneTabs == 3) {
showResults();
return;
} else {
$("#zone_" + activeZoneTabs).hide();
activeZoneTabs += 1;
$("#zone_" + activeZoneTabs).show();
currentTab = 0;
createSteps(activeZoneTabs);
}
if (activeZoneTabs == 1) {
document.body.style.setProperty("--c1", "#22bf73");
}
if (activeZoneTabs == 2) {
document.body.style.setProperty("--c1", "#ffcd38");
$("body").css("background", "linear-gradient(#e4ab00, #ffcd38)");
}
if (activeZoneTabs == 3) {
document.body.style.setProperty("--c1", "#ff3838");
$("body").css("background", "linear-gradient(#610909, #ff3838)");
}
}
showTab(currentTab);
}
function showResults() {
$('#checks-box').fade("out", () => {
$('#result-box').fade("in", () => {
var totalP = 0;
var pGreen = 0;
var pYellow = 0;
var pRed = 0;
$(".ans:checked").each(element => {
var val = parseInt(element.value);
if (val == 5)
pGreen += val;
else if (val == 6)
pYellow += val;
else
pRed += val;
totalP += val;
});
cProgressB.value = totalP;
cProgressG.value = pGreen;
cProgressY.value = pYellow;
cProgressR.value = pRed;
console.log(totalP);
var i = 1;
if (totalP <= 50) i = 1;
else if (totalP <= 150) i = 2;
else if (totalP <= 220) i = 3;
else if (totalP <= 300) i = 4;
else i = 5;
$("#rs" + i).fade("in");
if (i != 5) $("#rs-info").show();
});
$("body").css("background", "linear-gradient(#1126becc, #05c7adcc)");
});
}
function activeStep(n) {
var i, x = document.getElementsByClassName("step");
for (i = 0; i < x.length; i++) {
x[i].className = x[i].className.replace(" active", "");
}
x[n].className += " active";
}
});
</script>
</html>