about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--frontend/static/search.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/frontend/static/search.js b/frontend/static/search.js
index 52fa2f4..e16c83c 100644
--- a/frontend/static/search.js
+++ b/frontend/static/search.js
@@ -133,6 +133,11 @@ document.querySelector("a.current").addEventListener("click", function (ev) {
   state.results = "";
   history.pushState(state, null, ev.target.href);
   ev.preventDefault();
+  document.querySelectorAll("nav > a:not(.current)").forEach(function (node) {
+    const u = new URL(node.href);
+    u.search = "";
+    node.href = u.toString();
+  });
   queryInput.value = "";
 });