-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.html
More file actions
74 lines (52 loc) · 2.21 KB
/
game.html
File metadata and controls
74 lines (52 loc) · 2.21 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html>
<head>
<title> code quest </title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body onload="noBack();"
onpageshow="if(event.persisted) noBack():" onunload="" ;
background="treasure.jpg">
<header>
<div class="row">
<div class = "logo">
<img src="logogame final.png">
</div>
<ul class="main-nav">
<li class="active"><a href="game.html"> HOME </a></li>
<li><a href= "game1.html" > INSTRUCTIONS </a></li>
<li><a href= "end.html" > END </a></li>
</ul>
</div>
<br>
<h1>Welcome to Code Quest</h1>
<div class="button">
<a href="game1.html" class="btn btn1">START </a>
</div>
</header>
<script language="JavaScript">
//disable right click
document.addEventListener('contextmenu', event => event.preventDefault());
//disable inspect shortcuts
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>
<script type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
window.onbeforeload = function() {return" Your work will be lost." ;};
</script>
</body>
</html>