debug
This commit is contained in:
@@ -62,17 +62,16 @@
|
||||
countdownElement.textContent = countdown;
|
||||
if (countdown <= 0) {
|
||||
clearInterval(interval);
|
||||
// Check if there is a previous page in history
|
||||
if (document.referrer) {
|
||||
window.history.back();
|
||||
|
||||
} else {
|
||||
window.location.href = '/'; // Redirect to home if no previous page
|
||||
window.location.href = '/';
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
// Start the countdown when the script loads
|
||||
window.onload = startCountdown;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user