aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r--ext/js/background/backend.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index 66f80351..b25b6033 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -129,7 +129,8 @@ class Backend {
['triggerDatabaseUpdated', {async: false, contentScript: true, handler: this._onApiTriggerDatabaseUpdated.bind(this)}],
['testMecab', {async: true, contentScript: true, handler: this._onApiTestMecab.bind(this)}],
['textHasJapaneseCharacters', {async: false, contentScript: true, handler: this._onApiTextHasJapaneseCharacters.bind(this)}],
- ['getTermFrequencies', {async: true, contentScript: true, handler: this._onApiGetTermFrequencies.bind(this)}]
+ ['getTermFrequencies', {async: true, contentScript: true, handler: this._onApiGetTermFrequencies.bind(this)}],
+ ['findAnkiNotes', {async: true, contentScript: true, handler: this._onApiFindAnkiNotes.bind(this)}]
]);
this._messageHandlersWithProgress = new Map([
]);
@@ -752,6 +753,10 @@ class Backend {
return await this._translator.getTermFrequencies(termReadingList, dictionaries);
}
+ async _onApiFindAnkiNotes({query}) {
+ return await this._anki.findNotes(query);
+ }
+
// Command handlers
async _onCommandOpenSearchPage(params) {