-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript_lock.js
More file actions
53 lines (41 loc) · 1.49 KB
/
Copy pathscript_lock.js
File metadata and controls
53 lines (41 loc) · 1.49 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
jQuery(document).ready(function($) {
$(document).ready(function() {
// http://www.jsfuck.com/
var pin = (+!![] + []) + (!+[] + !![] + []) + (!+[] + !![] + !![] + []) + (!+[] + !![] + !![] + !![] + []);
var enterCode = "";
enterCode.toString();
$("#numbers button").click(function() {
var clickedNumber = $(this).text().toString();
enterCode = enterCode + clickedNumber;
var lengthCode = parseInt(enterCode.length);
lengthCode--;
$("#fields .numberfield:eq(" + lengthCode + ")").addClass("active");
if (lengthCode == 3) {
// Check the PIN
if (enterCode == pin) {
// Right PIN!
$("#fields .numberfield").addClass("right");
$("#numbers").addClass("hide");
window.open('https://sites.google.com/view/p-ecosystem/inicio-b', '_blank');
$("#anleitung p").html("Amazing!<br>You entered the correct Code!");
} else {
// Wrong PIN!
$("#fields").addClass("miss");
enterCode = "";
setTimeout(function() {
$("#fields .numberfield").removeClass("active");
}, 200);
setTimeout(function() {
$("#fields").removeClass("miss");
}, 500);
}
} else {}
});
$("#restartbtn").click(function(){
enterCode = "";
$("#fields .numberfield").removeClass("active");
$("#fields .numberfield").removeClass("right");
$("#numbers").removeClass("hide");
});
});
});