aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/dictionary.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/dictionary.js')
-rw-r--r--ext/bg/js/dictionary.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/bg/js/dictionary.js b/ext/bg/js/dictionary.js
index 90a40ee5..cc7b507c 100644
--- a/ext/bg/js/dictionary.js
+++ b/ext/bg/js/dictionary.js
@@ -74,11 +74,16 @@ class Dictionary {
findKanji(kanji) {
const results = [];
- for (const name in this.termDicts) {
- const def = this.termDicts[name][kanji];
+ for (const name in this.kanjiDicts) {
+ const def = this.kanjiDicts[name][kanji];
if (def) {
- const [c, k, o, g] = def;
- results.push({id: index, character: c, kunyomi: k, onyomi: o, glossary: g});
+ const [k, o, g] = def;
+ results.push({
+ character: kanji,
+ kunyomi: k.split(' '),
+ onyomi: o.split(' '),
+ glossary: g
+ });
}
}