From 89965613a99fa2956f630e9f804073113687238b Mon Sep 17 00:00:00 2001 From: Deepak Khatri <lorforlinux@beagleboard.org> Date: Mon, 25 Nov 2024 01:14:04 +0530 Subject: [PATCH] Fix 404 text rendering --- _templates/404.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/_templates/404.html b/_templates/404.html index 4215fbdf..e2431403 100644 --- a/_templates/404.html +++ b/_templates/404.html @@ -27,7 +27,7 @@ .then(response => { if (response.ok) { // Valid redirect is found - let redirectFound = true; + redirectFound = true; // Update the heading with the correct information const headingElement = document.getElementById('pageHeading'); @@ -75,7 +75,7 @@ clearInterval(countdownInterval); window.location.href = newUrl; } - }, 1000);5.4 + }, 1000); // Event listener for "Redirect Now" button document.getElementById('redirectNow').addEventListener('click', () => { @@ -93,6 +93,9 @@ countdownActive = false; clearInterval(countdownInterval); }); + } else { + // If the response is not OK, proceed to check other redirects + console.log(`No valid page found at ${newUrl}`); } }) .catch(error => { -- GitLab