-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage9.html
More file actions
executable file
·76 lines (64 loc) · 2.59 KB
/
page9.html
File metadata and controls
executable file
·76 lines (64 loc) · 2.59 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
75
76
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Jeść</title>
<link rel="stylesheet" href="styles1.css">
</head>
<body>
<h1>Jeść 😋</h1>
<!--A tutaj juz na zakończenie będzie coś o tej świeczce-->
<p id="b">Errorrorroroorororororrororororororororoororooror(booom!)</p>
<script>
function getQueryParameter(name) {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get(name);
}
const foodChoice = getQueryParameter('food');
switch (foodChoice) {
case 'pizza':
document.getElementById("b").innerHTML = "To lecimy na pizze 🍕";
break;
case 'burger':
document.getElementById("b").innerHTML = "To lecimy do burger kinga 🍔";
break;
case 'Pasibus':
document.getElementById("b").innerHTML = "To lecimy do pasibusa 🍔";
break;
case 'Oriental':
document.getElementById("b").innerHTML = "To lecimy do oriental express 🥗";
break;
case 'mcdonald':
document.getElementById("b").innerHTML = "To lecimy do mcdonnalda 🍟";
break;
case 'not-deciding':
document.getElementById("b").innerHTML = "Czyli wybieram ja... a ja mam ochote na pizze hut 😏🍕";
break;
default:
alert('Error');
location.href="page8.html";
}
function checkPassword(message, url) {
document.getElementById("password").style.display = null;
const input = document.getElementById("password").value.toLowerCase().trimEnd();
const correctPassword = "ziemniaczek"; // Replace with the actual password
if (input === correctPassword) {
location.href = url;
} else {
alert(message);
}
}
</script>
<div class="navigation">
<div class="password-section">
<input type="text" id="password"
style="display: none; border-radius: 10px; border: 2px solid pink; padding: 8px; background-color: #2c2c2c; color: white;"
placeholder="Po jedzonku">
<button class="button"
onclick="checkPassword('Co tak szybko... teraz czas na jedzonko, reszta potem. Wszystko w swoim czasie 😏','page10.html')">Najedzona 😏
</button>
</div>
</div>
</body>
</html>