Skip to content

Commit 0a54cd3

Browse files
authored
Merge pull request #48 from Pragya79645/master
window prompt on site load
2 parents 394d142 + f0d3381 commit 0a54cd3

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

script.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
window.onload = function() {
2-
const userResponse = prompt("Hello! Welcome to the mysterious world. Are you ready for what lies ahead?");
3-
4-
if (userResponse === null || userResponse.trim() === "") {
5-
alert("I didn't quite get you, but hope you'll have a blast anyway!");
6-
} else if (userResponse.toLowerCase() === "yes") {
7-
alert("Great! You're ready for the adventure ahead!");
8-
} else if (userResponse.toLowerCase() === "no") {
9-
alert("That's alright, maybe next time!");
10-
} else {
11-
alert("I didn't quite get you, but hope you'll have a blast anyway!");
12-
}
13-
};
14-
151

162
let score = 0;
173
document.getElementById("score").innerText = score;
@@ -283,12 +269,7 @@ function improveVanishingAct() {
283269
incrementPoints();
284270

285271

286-
addGhostlyFigure();
287-
288-
const solveButton = document.querySelector('.solve-me');
289-
const creepySound = document.getElementById('creepySound');
290-
const creepyOverlay = document.getElementById('creepyOverlay');
291-
272+
292273
solveButton.addEventListener('click', function() {
293274
creepySound.play();
294275
creepyOverlay.style.opacity = 1;

0 commit comments

Comments
 (0)