Add new types of pop-up case "annoying": var annoyingPopup = confirm("An annoying pop-up…
- User
Add new types of pop-up case "annoying": var annoyingPopup = confirm("An annoying pop-up is in your way. Click OK to close it."); if(annoyingPopup){ alert("You earned 10 points!"); } break; case "mine": var minePopup = prompt("Uh oh! It's a mine trap! You need to close it by typing 'close' to avoid getting a BSOD. Type here: "); if(minePopup === "close"){ alert("You earned 10 points!"); } else { console.log("BSOD: Blue Screen Of Death"); setTimeout(function(){location.reload()},500); } break; case "clippy": var clippyPopup = confirm("Hey! It's Clippy! He will say a random quote. Click OK to hear his quote."); var clippyQuotes = ["It looks like you're trying to close me. Would you like help with that?", "Did you know that CTRL + W will close a tab?", "I may be annoying, but at least I'm not a pop-up ad.", "If you can read this, you're too close.", "Closing me will earn you double points!"]; var randomQuote = clippyQuotes[Math.floor(Math.random() * clippyQuotes.length)]; alert(randomQuote); if(randomQuote === clippyQuotes[1]) { alert("Type 'close' to close Clippy! You need to do this to earn double points."); var closify = prompt("Type 'close': "); if(closify === "close") { alert("You earned 20 points!"); } else { console.log("BSOD: Blue Screen Of Death"); setTimeout(function(){location.reload()},500); } } else{ alert("You earned 10 points!"); } break; case "checkbox": var checkboxPopup = confirm("A checkbox pop-up! Click 'OK' to close the pop-up."); if(checkboxPopup){ alert("You earned 10 points!"); } break; case "pthue": var pthuePopup = confirm("PTHUE! It's in your way! Close it by clicking 'OK'."); if(pthuePopup){ alert("You earned 10 points!"); } break; case "advertisement": var adPopup = confirm("An advertisement is in your way. Click 'OK' to close it and continue playing for free!"); if(adPopup){ alert("You earned 10 points!"); } break; case "video": var videoPopup = confirm("A video ad is playing. Click 'OK' to skip the ad."); if(videoPopup){ alert("You earned 10 points!"); } break; case "captcha": var captchaPopup = prompt("Please enter the characters you see in the box below to close the pop-up:"); if(captchaPopup) { alert("You earned 10 points!"); } else { console.log("BSOD: Blue Screen Of Death"); setTimeout(function(){location.reload()},500); } break; case "survey": var surveyPopup = confirm("Take a quick survey to help improve our website. Click 'OK' to begin."); if(surveyPopup){ alert("Thank you for your feedback! You earned 10 points."); } break; case "newsletter": var newsletterPopup = confirm("Subscribe to our newsletter to get exclusive deals and updates. Click 'OK' to sign up."); if(newsletterPopup){ alert("Thank you for subscribing! You earned 10 points."); } break; case "discount": var discountPopup = confirm("Get 40% off your next purchase by clicking 'OK'! Don't miss out on this deal."); if(discountPopup){ alert("Thank you for shopping with us! You earned 10 points."); } break;
- Assistant
case "game": var gamePopup = confirm("Play a mini-game to earn extra points! Click 'OK' to begin."); if(gamePopup){ alert("You earned 20 points!"); } else { alert("Maybe next time!"); } break; case "feedback": var feedbackPopup = prompt("We value your opinion! Please leave us some feedback here:"); if(feedbackPopup) { alert("Thank you for your feedback! You earned 10 points."); } break; case "subscription": var subscriptionPopup = confirm("Subscribe to our premium membership to unlock exclusive content and features! Click 'OK' to sign up."); if(subscriptionPopup){ alert("Thank you for subscribing! You earned 15 points."); } break; case "social": var socialPopup = confirm("Follow us on social media for updates and behind-the-scenes content! Click 'OK' to follow us."); if(socialPopup){ alert("Thank you for following us! You earned 10 points."); } break; case "timer": var timerPopup = confirm("You only have 10 seconds to close this pop-up! Click 'OK' to start the timer."); var startTime = new Date().getTime(); var endTime = startTime + 10000; //10 seconds var timer; function startTimer() { var now = new Date().getTime(); var remainingTime = endTime - now; var seconds = Math.ceil(remainingTime / 1000); if (remainingTime <= 0) { clearInterval(timer); console.log("Time's up!"); setTimeout(function(){location.reload()},500); } else { document.title = "Time remaining: " + seconds + "s | Game Name"; } } if(timerPopup){ alert("You have 10 seconds to close this pop-up!"); timer = setInterval(startTimer, 1000); } break; case "image": var imagePopup = confirm("An image pop-up! Click 'OK' to close the pop-up and reveal the hidden image."); if(imagePopup){ alert("Congratulations! You found the hidden image. You earned 10 points!"); } break;