From 7f0412a9e4e9f14a78e41f3e1264aedd6d60575e Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Mon, 2 Oct 2023 11:49:50 +0300 Subject: [PATCH] not sure if more proper --- mirva/resources/mirva.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mirva/resources/mirva.js b/mirva/resources/mirva.js index 4268f3a..3c8a73a 100644 --- a/mirva/resources/mirva.js +++ b/mirva/resources/mirva.js @@ -4,6 +4,7 @@ let scrollTimer = null; let scrollEventTimer = null; let defaultScroll = "smooth"; let loadTime = new Date(); +let historyState = window.history.state; function r(f) { /in/.test(document.readyState) ? setTimeout('r(' + f + ')', 9) : f() @@ -160,7 +161,7 @@ function scroll_to(element) { } 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() {