From 13d8e69b93c51776cd7fe73961f6873d756a995e Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Sat, 28 Dec 2024 05:21:24 +0100 Subject: search translate --- assets/js/search.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'assets/js/search.js') diff --git a/assets/js/search.js b/assets/js/search.js index 2dc147e..ab2256b 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -63,19 +63,15 @@ function renderResults(results) { resultBox.appendChild(resultEntry(value.item, key)) }) } else { - resultBox.innerHTML = - "

No matches found

" + resultBox.innerHTML = document.getElementById("no-match").innerHTML } } -addEventListener("load", function (){ +addEventListener("load", function () { let searchQuery = getUrlParameter(location.search, "q") if (searchQuery) { document.getElementById("search-query").value = searchQuery executeSearch(searchQuery).then(renderResults) - } else { - document.getElementById("search-results").innerHTML = - "

Please enter a word or phrase above

" } } ) -- cgit v1.2.3