From f087671e2f78acdc6a40a85549708a91a263582b Mon Sep 17 00:00:00 2001 From: berrymot Date: Thu, 25 Jan 2024 16:50:36 -0800 Subject: [PATCH] actual --- events.js | 4 ---- worker.js | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/events.js b/events.js index bc6fb9a..2adb8f5 100644 --- a/events.js +++ b/events.js @@ -57,10 +57,6 @@ id("search").addEventListener("input", function() { clearResults(); redirect(); timer = setTimeout(function() { - if (q == "hi" && !config["regex"] && !config["rhyme"]) { - id("length").innerHTML = "

the word you're looking for is coi

just trust me"; - return; - } if (q.length) { id("bottom").innerHTML = "loading..."; if (!config["rhyme"] && !config["regex"]) { diff --git a/worker.js b/worker.js index fc942d6..c8249cb 100644 --- a/worker.js +++ b/worker.js @@ -57,6 +57,11 @@ function search(query) { } else if (/^[A-GI-PR-VX-Z][A-GhI-PR-VX-Zabc0-9*]*$/.test(original)) { // TODO: make this work (issue #1) } else { + // hi + if (query == "hi") { + results.push([jbo.find(entry => entry.word == "coi"), 3]); + return results; + } // exact matches for (const w of query.split(/[\s.]+/)) { const exact = jbo.find(entry => entry.word.toLowerCase().replace(/\./g, "") == h(w));