fixed history system
This commit is contained in:
parent
12e1af1339
commit
fb9b4757e1
1 changed files with 1 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue