From b7dbf6e7566fc7e157386d4f422c151e07eb7b45 Mon Sep 17 00:00:00 2001 From: mkusaka Date: Sun, 7 May 2023 21:45:03 +0900 Subject: [PATCH] use repalce instead of push --- content.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content.ts b/content.ts index e944067..d7fb6ab 100644 --- a/content.ts +++ b/content.ts @@ -132,7 +132,7 @@ if (container) { urlSearchParams.set("slide", nextSlideNumber); url.search = urlSearchParams; } - history.push(url.toString()); + history.replace(url.toString()); }); const right = document.querySelector("#right-overlay-rfs"); right?.addEventListener("click", (event) => { @@ -157,7 +157,7 @@ if (container) { const url = new URL(window.location.href); urlSearchParams.set("slide", nextSlideNumber); url.search = urlSearchParams; - history.push(url.toString()); + history.replace(url.toString()); }); } }