aboutsummaryrefslogtreecommitdiffstats
path: root/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/search.js8
1 files changed, 2 insertions, 6 deletions
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 =
- "<p class=\"bg-washed-red pa3 dark-red f4 fw6 tc br2 b--light-red ba\">No matches found</p>"
+ 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 =
- "<p class=\"pa3 f4 fw6 tc\">Please enter a word or phrase above</p>"
}
}
)