diff options
-rw-r--r-- | search.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/search.html b/search.html index b4794e2..4670f07 100644 --- a/search.html +++ b/search.html @@ -18,13 +18,13 @@ layout: page // search function query(queryterm) { var result = do_search(queryterm); - const rbase = document.getElementById("results") + const rbase = document.getElementById("results"); rbase.textContent = ""; if (result.length) { var root = rbase.appendChild(document.createElement("ul")); - result.forEach(r => { - const p = pages.find(p => p.id == r.ref); - var li = document.createElement("li") + result.forEach(function(r) { + const p = pages.find((p) => p.id === r.ref); + var li = document.createElement("li"); var el = li.appendChild(document.createElement("a")); el.textContent = p.title; el.href = p.url; @@ -38,8 +38,8 @@ layout: page rbase.appendChild(el); } document.getElementById("qterm").textContent = queryterm; - }; - document.getElementById("qsubmit").onclick = ev => { + } + document.getElementById("qsubmit").onclick = function(ev) { const qbox = document.getElementById("input_qterm").value; if (qbox.length !== 0) { query(qbox); |