From 96584c970a79ea8f809611eb1ab4a5a66935e702 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sat, 25 Jul 2026 14:39:19 +0000 Subject: [PATCH] Harden URL hash handling for UX mode --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 801109b..5f43abe 100644 --- a/index.html +++ b/index.html @@ -1069,7 +1069,8 @@ function writeHash(){ const p=new URLSearchParams(); KEYS.forEach(k=>{ if (S[k]!==DEFAULT[k]) p.set(k,S[k]); }); hashLock=true; - history.replaceState(null,"", p.toString()? "#"+p.toString() : location.pathname); + const baseUrl = window.location.pathname + window.location.search; + history.replaceState(null,"", p.toString()? "#"+p.toString() : baseUrl); setTimeout(()=>hashLock=false,0); } function readHash(){