From 5231bb9a84d177948a5fde46a0d8e2cb7adcb7ea Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Sat, 23 May 2020 17:30:03 +0200 Subject: Make search return page instead of match --- search.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'search.html') diff --git a/search.html b/search.html index 99b8203..39bf90f 100644 --- a/search.html +++ b/search.html @@ -25,14 +25,14 @@ in_navbar: true rbase.textContent = ""; if (result.length) { var root = rbase.appendChild(document.createElement("ul")); - result.forEach(function(r) { - const p = pages.find((p) => p.id === r.ref); + result.forEach(function(p) { var li = document.createElement("li"); var el = li.appendChild(document.createElement("a")); el.textContent = p.title; el.href = p.url; - el = li.appendChild(document.createElement("span")); - el.textContent = " [score: " + r.score.toString() + "]"; + // converted to page, to more score + /*el = li.appendChild(document.createElement("span")); + el.textContent = " [score: " + r.score.toString() + "]";*/ root.appendChild(li); }); } else { -- cgit v1.2.3