diff options
author | Tom Smeding <tom@tomsmeding.com> | 2023-06-12 23:05:22 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2023-06-12 23:05:22 +0200 |
commit | fdbedfe021aca37dbb17c47fb613c2b9b4c134d9 (patch) | |
tree | c12209d95ece500f44b89808930991c2db6c01b3 | |
parent | 3e1bb028e538efebcab2ef959acd4b4c701afa59 (diff) |
unicode: Don't span history, replace history state
-rw-r--r-- | modules/unicode/index.html | 6 |
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() { |