summaryrefslogtreecommitdiff
path: root/modules/unicode
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2023-06-12 23:05:22 +0200
committerTom Smeding <tom@tomsmeding.com>2023-06-12 23:05:22 +0200
commitfdbedfe021aca37dbb17c47fb613c2b9b4c134d9 (patch)
treec12209d95ece500f44b89808930991c2db6c01b3 /modules/unicode
parent3e1bb028e538efebcab2ef959acd4b4c701afa59 (diff)
unicode: Don't span history, replace history state
Diffstat (limited to 'modules/unicode')
-rw-r--r--modules/unicode/index.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/unicode/index.html b/modules/unicode/index.html
index cb2beaa..924f86e 100644
--- a/modules/unicode/index.html
+++ b/modules/unicode/index.html
@@ -39,7 +39,11 @@ function do_lookup(override) {
if (input.length == 0) return;
}
- location.hash = input;
+ if ("history" in window && "replaceState" in history) {
+ history.replaceState(null, "", "#" + input);
+ } else {
+ location.hash = input;
+ }
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {