From 36fc42e94cbd2420212ec06d7ef164a9f723b6d3 Mon Sep 17 00:00:00 2001 From: Allexit Date: Wed, 2 Nov 2016 17:05:56 +0200 Subject: [PATCH] Testing history pushing --- js/main.js | 6 +++++- ts/main.ts | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index c8e0ff4..c36654f 100644 --- a/js/main.js +++ b/js/main.js @@ -17,7 +17,11 @@ function openPage(page) { window.currPage = page; document.getElementById(page).style.opacity = "0"; document.getElementById(page).className = ""; - window.history.pushState(page, page, "/" + page + "/"); + var target = page; + if (target == "about") { + target = ""; + } + ; slideOpacity(function () { }, 1.5); }, -1.5); diff --git a/ts/main.ts b/ts/main.ts index ee5c08f..60dc03c 100644 --- a/ts/main.ts +++ b/ts/main.ts @@ -26,7 +26,10 @@ function openPage(page: string) { window.currPage = page; document.getElementById(page).style.opacity = "0"; document.getElementById(page).className = ""; - window.history.pushState(page, page, `/${page}/`); + let target = page; + if (target == "about") { target = "" }; + + //window.history.pushState(target, target, `/${target}/`); slideOpacity(() => { }, 1.5);