Merge: search-palette deep-links honor ?q= on /courts + /glossary (t-paliad-046)

This commit is contained in:
m
2026-04-26 14:48:25 +02:00
2 changed files with 14 additions and 0 deletions

View File

@@ -291,6 +291,13 @@ function initSearch() {
searchQuery = input.value;
render();
});
// Honor `?q=` from the global search-palette deep links. render() runs
// after loadCourts() resolves and reads the module-level searchQuery.
const q = new URLSearchParams(location.search).get("q");
if (q) {
input.value = q;
searchQuery = q;
}
}
// --- Feedback modal ---

View File

@@ -85,6 +85,13 @@ function initSearch() {
searchQuery = input.value;
render();
});
// Honor `?q=` from the global search-palette deep links. render() runs
// after loadTerms() resolves and reads the module-level searchQuery.
const q = new URLSearchParams(location.search).get("q");
if (q) {
input.value = q;
searchQuery = q;
}
}
// --- Category filters ---