summaryrefslogtreecommitdiff
path: root/static/menu.js
diff options
context:
space:
mode:
authorJani Peter Karhunen <jkarhun2@local>2023-11-25 03:32:29 +0200
committerJani Peter Karhunen <jkarhun2@local>2023-11-25 03:32:29 +0200
commitd2de3ae10b6f5314bd4b8243218212d2004f35b0 (patch)
tree2ab448e0c2ec361478851dbcb43bcd176d17b584 /static/menu.js
parentc059696450d301b99956d643c21b0e46b4fc39dc (diff)
MEGA Commit. Rework of routing. Visuals. Answer analysis and much more.
Diffstat (limited to 'static/menu.js')
-rw-r--r--static/menu.js6
1 files changed, 3 insertions, 3 deletions
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 => {