diff options
Diffstat (limited to 'frontend/search.ts')
-rw-r--r-- | frontend/search.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/search.ts b/frontend/search.ts index bca2fc0..40b7f91 100644 --- a/frontend/search.ts +++ b/frontend/search.ts @@ -24,11 +24,15 @@ export function section_search(engine: string) { const input = e("input", { type: "text" }) input.addEventListener("keydown", ev => { - if (ev.code == "Enter") process_query(engine, input.value ?? "") + if (ev.code == "Enter") { + history.pushState({}, "", window.location.href) + process_query(engine, input.value ?? "") + } }) const submit = e("button", {}, "Search") submit.addEventListener("click", () => { + history.pushState({}, "", window.location.href) process_query(engine, input.value ?? "") }) |