not sure if more proper

This commit is contained in:
2023-10-02 11:49:50 +03:00
parent f5357e0bc8
commit 7f0412a9e4

View File

@@ -4,6 +4,7 @@ let scrollTimer = null;
let scrollEventTimer = null; let scrollEventTimer = null;
let defaultScroll = "smooth"; let defaultScroll = "smooth";
let loadTime = new Date(); let loadTime = new Date();
let historyState = window.history.state;
function r(f) { function r(f) {
/in/.test(document.readyState) ? setTimeout('r(' + f + ')', 9) : f() /in/.test(document.readyState) ? setTimeout('r(' + f + ')', 9) : f()
@@ -160,7 +161,7 @@ function scroll_to(element) {
} }
function set_url_arg(i) { function set_url_arg(i) {
window.history.replaceState('', document.head.title, `?i=${i}`); window.history.replaceState(historyState, document.head.title, `?i=${i}`);
} }
function get_url_arg() { function get_url_arg() {