usable application #1

Merged
sfja.skp merged 7 commits from :main into main 2024-01-19 07:27:08 +00:00
Showing only changes of commit cd6c8c88b5 - Show all commits

View File

@ -30,6 +30,8 @@ function displayResponse(response) {
function main() { function main() {
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
const searchElement = document.getElementById("query");
searchElement.value = params.get("query") || "";
return fetch(`/api/search?${params.toString()}`) return fetch(`/api/search?${params.toString()}`)
.then(v => v.json()) .then(v => v.json())
.then(displayResponse); .then(displayResponse);