Skip to content

Commit

Permalink
actual
Browse files Browse the repository at this point in the history
  • Loading branch information
mi2ebi committed Jan 26, 2024
1 parent ee5e1cf commit f087671
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions events.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ id("search").addEventListener("input", function() {
clearResults();
redirect();
timer = setTimeout(function() {
if (q == "hi" && !config["regex"] && !config["rhyme"]) {
id("length").innerHTML = "<p>the word you're looking for is <a href='?q=coi'><i>coi</i></a></p><small>just trust me</small>";
return;
}
if (q.length) {
id("bottom").innerHTML = "loading...";
if (!config["rhyme"] && !config["regex"]) {
Expand Down
5 changes: 5 additions & 0 deletions worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit f087671

Please sign in to comment.