From 303ce839907f070a0061b0e3e1c2c91c44f9b3d8 Mon Sep 17 00:00:00 2001 From: sneedgroup-holder Date: Sat, 15 Feb 2025 16:52:49 +0000 Subject: [PATCH] Update captcha.html --- captcha.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/captcha.html b/captcha.html index b140f92..ab3374a 100644 --- a/captcha.html +++ b/captcha.html @@ -212,6 +212,12 @@ currentQuestionIndex = randomIndex; } + function generateRandomURL() { + // Generate a random number to append as a query parameter + const randomParam = Math.floor(Math.random() * 1000000); + return window.location.href.split('?')[0] + `?captcha=${randomParam}`; + } + function checkAnswer() { const answer = document.getElementById("captcha-answer").value.trim().toLowerCase(); const correctAnswer = questions[currentQuestionIndex].answer.toLowerCase(); @@ -222,8 +228,13 @@ document.getElementById("captcha-question").style.display = 'none'; document.getElementById("captcha-answer").style.display = 'none'; document.getElementById("submit-button").style.display = 'none'; + + // Generate a random URL parameter and redirect after 2 seconds + setTimeout(function() { + window.location.href = generateRandomURL(); + }, 2000); + strikeCount = 0; - setTimeout(loadNewQuestion, 2000); // Wait before loading next question } else { strikeCount++; if (strikeCount < 3) {