summaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-01-08 15:33:45 -0800
committerAlex Yatskov <alex@foosoft.net>2017-01-08 15:33:45 -0800
commit148291d3a7cea096317c1c8d22f06f6e18cfdcfb (patch)
tree7ac7bb03cc980d3c1bd6cbdb84f6a8b6851012b9 /ext/bg/js/yomichan.js
parent0498ea5d361867f34b6b813178a39709e8bea68e (diff)
WIP
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index 69397a61..f96e4437 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -188,7 +188,29 @@ class Yomichan {
}
promiseCallback(
- this.translator.findTerm(text, dictionaries, this.options.enableSoftKatakanaSearch),
+ this.translator.findTerm(
+ text,
+ dictionaries,
+ this.options.enableSoftKatakanaSearch
+ ),
+ callback
+ );
+ }
+
+ api_findTermGrouped({text, callback}) {
+ const dictionaries = [];
+ for (const title in this.options.dictionaries) {
+ if (this.options.dictionaries[title].enableTerms) {
+ dictionaries.push(title);
+ }
+ }
+
+ promiseCallback(
+ this.translator.findTermGrouped(
+ text,
+ dictionaries,
+ this.options.enableSoftKatakanaSearch
+ ),
callback
);
}