From fb9b4757e145ffd822c77e50e7bf7d64b4d08bbb Mon Sep 17 00:00:00 2001 From: asyncnomi Date: Wed, 21 Dec 2022 23:25:34 +0100 Subject: [PATCH] fixed history system --- static/js/main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index 2645296..7508503 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,7 +1,6 @@ const base_url = "https://oss110metz.rezo-rm.fr/" var page = ['#main-page', '#admin-page', '#login-page', '#demande-page']; -var historyHandler = []; window.onpopstate = history.onpushstate = function(e) { if (e.state) { show_page(e.state, true); @@ -11,7 +10,7 @@ window.onpopstate = history.onpushstate = function(e) { }; history.pushState("#main-page", "", "") -function show_page(id) { +function show_page(id, historyPush) { for(i in page) { $(page[i]).hide(); }