Testing history pushing

This commit is contained in:
Allexit 2016-11-02 17:05:56 +02:00
parent 5c496d3221
commit 36fc42e94c
2 changed files with 9 additions and 2 deletions

View File

@ -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);

View File

@ -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);