-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpg4-level1.html
142 lines (140 loc) · 5.42 KB
/
pg4-level1.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Decode Mysteries</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/level1.css" />
</head>
<body oncontextmenu="return false;">
<!--<div id="loader" class="center"></div>-->
<div id="loader" class="middle">
<div class="bar bar1"></div>
<div class="bar bar2"></div>
<div class="bar bar3"></div>
<div class="bar bar4"></div>
<div class="bar bar5"></div>
<div class="bar bar6"></div>
<div class="bar bar7"></div>
<div class="bar bar8"></div>
</div>
<div class="unselectable" id="mouse"><img
id="Barrel"
src="img/obj2"
onclick="document.getElementById('2').style.textDecorationLine='line-through'; document.getElementById('Barrel').style.visibility='hidden'"
/>
<img
id="Knife"
src="img/obj4"
onclick="document.getElementById('4').style.textDecorationLine='line-through'; document.getElementById('Knife').style.visibility='hidden'"
/>
<img
id="Hat"
src="img/obj3.png"
onclick="document.getElementById('3').style.textDecorationLine='line-through'; document.getElementById('Hat').style.visibility='hidden'"
/>
<img
id="Shoe"
src="img/obj5"
onclick="document.getElementById('5').style.textDecorationLine='line-through'; document.getElementById('Shoe').style.visibility='hidden'"
/>
<img
id="Remote"
src="img/obj1"
onclick="document.getElementById('1').style.textDecorationLine='line-through'; document.getElementById('Remote').style.visibility='hidden'"
/>
</div>
<div id="grid">
<span id="5">Shoe</span>
<span id="3">Hat</span>
<span id="1">Remote</span>
<span id="2">Barrel</span>
<span id="4">Knife</span>
<audio controls autoplay loop hidden>
<source src="bgm/bgm.mp3" type="audio/mpeg" />
Your browser does not support the audio tag.
</audio>
<script>
let user_score = 0;
document.getElementById("mouse").style.cursor = "default";
document.getElementById("Barrel").onclick = function () {
user_score += 1;
document.getElementById("2").style.textDecorationLine =
"line-through";
document.getElementById("Barrel").style.visibility = "hidden";
if (user_score == 5) {
alert("Congratulations! You have found all the objects.");
window.location.href = "pg5-questions.html";
}
};
document.getElementById("Knife").onclick = function () {
user_score += 1;
document.getElementById("4").style.textDecorationLine =
"line-through";
document.getElementById("Knife").style.visibility = "hidden";
if (user_score == 5) {
alert("Congratulations! You have found all the objects.");
window.location.href = "pg5-questions.html";
}
};
document.getElementById("Hat").onclick = function () {
user_score += 1;
document.getElementById("3").style.textDecorationLine =
"line-through";
document.getElementById("Hat").style.visibility = "hidden";
if (user_score == 5) {
alert("Congratulations! You have found all the objects.");
window.location.href = "pg5-questions.html";
}
};
document.getElementById("Shoe").onclick = function () {
user_score += 1;
document.getElementById("5").style.textDecorationLine =
"line-through";
document.getElementById("Shoe").style.visibility = "hidden";
if (user_score == 5) {
alert("Congratulations! You have found all the objects.");
window.location.href = "pg5-questions.html";
}
};
document.getElementById("Remote").onclick = function () {
user_score += 1;
document.getElementById("1").style.textDecorationLine =
"line-through";
document.getElementById("Remote").style.visibility = "hidden";
if (user_score == 5) {
alert("Congratulations! You have found all the objects.");
window.location.href = "pg5-questions.html";
}
};
document.onreadystatechange = function () {
if (document.readyState !== "complete") {
document.querySelector("body").style.visibility = "hidden";
document.querySelector("#loader").style.visibility = "visible";
} else {
document.querySelector("#loader").style.display = "none";
document.querySelector("body").style.visibility = "visible";
}
};
</script>
<script type="text/javascript">
document.addEventListener('contextmenu', event => event.preventDefault());
document.onkeydown = function (e) {
if (event.keyCode == 123) {
return false;
}
if (e.ctrlKey && e.shiftKey && e.keyCode == "I".charCodeAt(0)) {
return false;
}
if (e.ctrlKey && e.shiftKey && e.keyCode == "J".charCodeAt(0)) {
return false;
}
if (e.ctrlKey && e.keyCode == "U".charCodeAt(0)) {
return false;
}
};
</script>
</div>
</body>
</html>