diff --git a/public/search/script.js b/public/search/script.js index e154ab0..165e7b6 100644 --- a/public/search/script.js +++ b/public/search/script.js @@ -30,6 +30,8 @@ function displayResponse(response) { function main() { const params = new URLSearchParams(window.location.search); + const searchElement = document.getElementById("query"); + searchElement.value = params.get("query") || ""; return fetch(`/api/search?${params.toString()}`) .then(v => v.json()) .then(displayResponse);