summaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-03-02 20:23:56 -0800
committerAlex Yatskov <alex@foosoft.net>2017-03-02 20:23:56 -0800
commit5ecca4627e4edd54b8af606c69aa51e4b659deef (patch)
tree3ef86e9408c6050a895c966704bd17b307e1ce55 /ext/bg/js/yomichan.js
parentb9c849a02078a5d6b99a0650b1ef3373232dc0c4 (diff)
enable and disable via toggle switch
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index d7d2317f..a544d0ad 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -20,8 +20,8 @@
class Yomichan {
constructor() {
Handlebars.partials = Handlebars.templates;
- Handlebars.registerHelper('kanjiLinks', kanjiLinks);
- Handlebars.registerHelper('multiLine', multiLine);
+ Handlebars.registerHelper('kanjiLinks', helperKanjiLinks);
+ Handlebars.registerHelper('multiLine', helperMultiLine);
this.translator = new Translator();
this.anki = new AnkiNull();
@@ -132,7 +132,7 @@ class Yomichan {
api_findKanji({text, callback}) {
promiseCallback(
- this.translator.findKanji(text, enabledDicts(this.options)).then(definitions => {
+ this.translator.findKanji(text, optionsEnabledDicts(this.options)).then(definitions => {
return definitions.slice(0, this.options.general.maxResults);
}),
callback
@@ -141,7 +141,7 @@ class Yomichan {
api_findTerms({text, callback}) {
promiseCallback(
- this.translator.findTerms(text, enabledDicts(this.options), this.options.general.softKatakana).then(({definitions, length}) => {
+ this.translator.findTerms(text, optionsEnabledDicts(this.options), this.options.general.softKatakana).then(({definitions, length}) => {
return {length, definitions: definitions.slice(0, this.options.general.maxResults)};
}),
callback
@@ -150,7 +150,7 @@ class Yomichan {
api_findTermsGrouped({text, callback}) {
promiseCallback(
- this.translator.findTermsGrouped(text, enabledDicts(this.options), this.options.general.softKatakana).then(({definitions, length}) => {
+ this.translator.findTermsGrouped(text, optionsEnabledDicts(this.options), this.options.general.softKatakana).then(({definitions, length}) => {
return {length, definitions: definitions.slice(0, this.options.general.maxResults)};
}),
callback