Harden URL hash handling for UX mode

This commit is contained in:
Hermes Agent
2026-07-25 14:39:19 +00:00
parent 60d6361ecf
commit 96584c970a
+2 -1
View File
@@ -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(){