keep hash clean (browser nav to # was broken)

This commit is contained in:
Til Schmitter 2026-05-13 20:50:36 +02:00
parent d42b51cdc2
commit e67ec978f7

View file

@ -1662,6 +1662,10 @@ function goto(dest) {
window.onhashchange = function() {
console.log('hash change: ' + location.hash)
// keep it clean
if(location.hash == '')
hist_replace(location.pathname + location.search);
var a_modal = QS('.modal.vis');
if(location.hash.length <= 1 && a_modal){
modaltoggle(a_modal.id);