Use history.replaceState on initial redirect

This commit is contained in:
Eric Zhang 2021-06-05 16:21:46 -05:00
parent 301faa43e2
commit f19d11f555

View file

@ -9,7 +9,7 @@ function getHash() {
for (let i = 0; i < idLen; i++) {
id += chars[Math.floor(Math.random() * chars.length)];
}
window.location.hash = id;
window.history.replaceState(null, "", "#" + id);
}
return window.location.hash.slice(1);
}