From d2de3ae10b6f5314bd4b8243218212d2004f35b0 Mon Sep 17 00:00:00 2001 From: Jani Peter Karhunen Date: Sat, 25 Nov 2023 03:32:29 +0200 Subject: MEGA Commit. Rework of routing. Visuals. Answer analysis and much more. --- static/menu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'static/menu.js') diff --git a/static/menu.js b/static/menu.js index 5256ef2..8d0baee 100644 --- a/static/menu.js +++ b/static/menu.js @@ -132,7 +132,7 @@ hashToPage = async () => { else document.getElementById(`${currentPage}_page`).className = 'page' pageElement.className = 'page pageActive' - if ( !pageElement.loaded ) await fetch( pages[p].URL ) + if ( pages[p].dynamic || !pageElement.loaded ) await fetch( pages[p].URL ) .then( response => { if (!response.ok) return `ERROR loading "${pages[p].URL}"!` return response.text() @@ -141,10 +141,10 @@ hashToPage = async () => { pageElement.innerHTML = text; pageElement.loaded = true; } ) - if ( pageElement.innerHTML.startsWith("redirect = ") ) { +/* if ( pageElement.innerHTML.startsWith("redirect = ") ) { pageElement.loaded = false; window.location.assign( pageElement.innerHTML.slice( 11 ) ); - } + }*/ // https://plnkr.co/edit/MMegiu by Allen Kim Array.from(pageElement.querySelectorAll("script")).forEach(oldScript => { -- cgit v1.2.3