-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
secret.html
84 lines (75 loc) · 2.21 KB
/
secret.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
<!DOCTYPE html>
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3NHFVTRVLZ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-3NHFVTRVLZ');
</script>
<title>Hidden Page - Secret Game</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #E6F2F8;
}
.game-container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: center;
}
h1 {
color: #004E7C;
margin-bottom: 20px;
}
p {
font-size: 18px;
color: #333;
margin-bottom: 10px;
}
.current-letter {
font-size: 36px;
font-weight: bold;
color: #FF8C00;
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="game-container">
<h1>Hidden Page - Secret Game</h1>
<p>Try to type the letters in order:</p>
<p class="current-letter"></p>
<script>
// Define the sequence of letters
const letterSequence = ['z', 'i', 'g', 'a', 'o'];
let currentLetterIndex = 0;
const currentLetterElement = document.querySelector('.current-letter');
// Event listener for keydown
document.addEventListener('keydown', handleKeyDown);
// Function to handle keydown event
function handleKeyDown(event) {
const pressedKey = event.key.toLowerCase();
const currentLetter = letterSequence[currentLetterIndex];
// Check if the pressed key matches the current letter
if (pressedKey === currentLetter) {
// Increase the current letter index
currentLetterIndex++;
// Update the current letter element
currentLetterElement.textContent = currentLetter.toUpperCase();
// Check if all letters have been typed
if (currentLetterIndex === letterSequence.length) {
// All letters have been typed, redirect to maze.html
window.location.href = 'maze.html';
}
}
}
</script>
</div>
</body>
</html>