diff --git a/src/front/cobalt.js b/src/front/cobalt.js index 4a3ad9e6..31761c28 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -607,10 +607,24 @@ window.onload = () => { detectColorScheme(); popup("migration", 1); } + + if (window.location.hash) { + const input = window.location.hash.slice(1); + eid("url-input-area").value = input; + button() + } + window.history.replaceState(null, '', window.location.pathname); notificationCheck(); } +window.onhashchange = () => { + if (window.location.hash) { + const input = window.location.hash.slice(1); + eid("url-input-area").value = input; + button() + } +} eid("url-input-area").addEventListener("keydown", (e) => { button(); })