From 17551a5ec09d4b2f3913cfc348b6c85a30e3a078 Mon Sep 17 00:00:00 2001 From: cocaillot Date: Sat, 8 Mar 2025 23:07:03 +0100 Subject: [PATCH] fixed toggle.js logic --- httpdocs/toggle.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/httpdocs/toggle.js b/httpdocs/toggle.js index 054afa6..611eda4 100644 --- a/httpdocs/toggle.js +++ b/httpdocs/toggle.js @@ -1,7 +1,7 @@ -const devMode = true; // set to false when you want to go back to your normal site +const devMode = true; // Change to false to return to the normal site -if(devMode && window.location.pathname !== '/under-dev.html'){ - window.location.replace('under-dev.html'); -} else if (!devMode && window.location.pathname === '/under-dev.html') { +if (devMode && !window.location.pathname.endsWith('under_dev.html')) { + window.location.replace('under_dev.html'); +} else if (!devMode && window.location.pathname.endsWith('under_dev.html')) { window.location.replace('index.html'); -} \ No newline at end of file +}