forked from sfja.skp/maotube
fill in query from params
This commit is contained in:
parent
7d830830f6
commit
cd6c8c88b5
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user