feat: input prefill with location hash

This commit is contained in:
jojobii-arks 2023-11-13 10:47:49 -08:00
parent 60743cdcdf
commit d5465699e8
No known key found for this signature in database

View File

@ -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();
})