aboutsummaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-07-14 10:16:53 -0400
committertdro <tdro@noreply.example.com>2022-07-14 10:16:53 -0400
commit4f1a667965e9c4bf92fe6a5886d7fed883b22ed7 (patch)
tree736d640684737ffe392c687873cdee662728fd62 /assets/js
parent5d381dc1e70a28828bfbab759d5ffc83e93527eb (diff)
downloadcanory-4f1a667965e9c4bf92fe6a5886d7fed883b22ed7.tar.gz
canory-4f1a667965e9c4bf92fe6a5886d7fed883b22ed7.tar.bz2
canory-4f1a667965e9c4bf92fe6a5886d7fed883b22ed7.zip
static/js/fixedsearch: Set title
Start setup for searching other categories.
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/assets/js/index.js b/assets/js/index.js
index 77c52a6..d64997c 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -418,9 +418,10 @@
} else {
dropdown.removeAttribute("hidden");
for(const string in results.slice(0, 10)){
- let highlight = fuzzysort.highlight(fuzzysort.single(term, results[string].obj.title), "<span>", "</span>");
+ const title = results[string].obj.title;
+ let highlight = fuzzysort.highlight(fuzzysort.single(term, title), "<span>", "</span>");
if (highlight === null) {
- highlight = results[string].obj.title;
+ highlight = title;
}
items = items + `
<li>