From 029b09cda1b497752ee95e76232d3d633cf68367 Mon Sep 17 00:00:00 2001 From: tdro Date: Wed, 8 Jun 2022 00:14:54 -0400 Subject: static/js/pager: Remove unnecessary replace state --- assets/js/index.js | 3 --- static/js/pager.ts | 7 ------- 2 files changed, 10 deletions(-) diff --git a/assets/js/index.js b/assets/js/index.js index b284ce8..1c2715b 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -32,9 +32,6 @@ const currentPosition = self.pageYOffset; settings["pager"][url] = currentPosition; localStorage["settings"] = JSON.stringify(settings); - if (self.location.hash.length === 0) { - history.replaceState({}, document.title, window.location.href.split("#")[0]); - } }); self.addEventListener("DOMContentLoaded", function() { const up = document.getElementById("top"); diff --git a/static/js/pager.ts b/static/js/pager.ts index 88e9f83..49f3b2d 100644 --- a/static/js/pager.ts +++ b/static/js/pager.ts @@ -28,13 +28,6 @@ const currentPosition = self.pageYOffset; settings["pager"][url] = currentPosition; localStorage["settings"] = JSON.stringify(settings); - if (self.location.hash.length === 0) { - history.replaceState( - {}, - document.title, - window.location.href.split("#")[0], - ); - } }); self.addEventListener("DOMContentLoaded", function () { -- cgit v1.2.3