diff options
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r-- | ext/bg/js/yomichan.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js index 67b1606c..27077f57 100644 --- a/ext/bg/js/yomichan.js +++ b/ext/bg/js/yomichan.js @@ -106,15 +106,11 @@ class Yomichan { tabInvokeAll(action, params) { chrome.tabs.query({}, tabs => { for (const tab of tabs) { - this.tabInvoke(tab.id, action, params); + chrome.tabs.sendMessage(tab.id, {action, params}, () => null); } }); } - tabInvoke(tabId, action, params) { - chrome.tabs.sendMessage(tabId, {action, params}, () => null); - } - formatNote(definition, mode) { const note = {fields: {}, tags: this.options.anki.tags}; @@ -174,7 +170,7 @@ class Yomichan { ); } - api_findTerm({text, callback}) { + api_findTerms({text, callback}) { const dictionaries = []; for (const title in this.options.dictionaries) { if (this.options.dictionaries[title].enableTerms) { @@ -183,7 +179,7 @@ class Yomichan { } promiseCallback( - this.translator.findTerm( + this.translator.findTerms( text, dictionaries, this.options.general.softKatakana @@ -192,7 +188,7 @@ class Yomichan { ); } - api_findTermGrouped({text, callback}) { + api_findTermsGrouped({text, callback}) { const dictionaries = []; for (const title in this.options.dictionaries) { if (this.options.dictionaries[title].enableTerms) { @@ -201,7 +197,7 @@ class Yomichan { } promiseCallback( - this.translator.findTermGrouped( + this.translator.findTermsGrouped( text, dictionaries, this.options.general.softKatakana |