aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 012036dc..b2ea3cd6 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -90,6 +90,7 @@ class Backend {
['kanjiFind', {async: true, contentScript: true, handler: this._onApiKanjiFind.bind(this)}],
['termsFind', {async: true, contentScript: true, handler: this._onApiTermsFind.bind(this)}],
['textParse', {async: true, contentScript: true, handler: this._onApiTextParse.bind(this)}],
+ ['getAnkiConnectVersion', {async: true, contentScript: true, handler: this._onApGetAnkiConnectVersion.bind(this)}],
['isAnkiConnected', {async: true, contentScript: true, handler: this._onApiIsAnkiConnected.bind(this)}],
['addAnkiNote', {async: true, contentScript: true, handler: this._onApiAddAnkiNote.bind(this)}],
['getAnkiNoteInfo', {async: true, contentScript: true, handler: this._onApiGetAnkiNoteInfo.bind(this)}],
@@ -428,6 +429,10 @@ class Backend {
return results;
}
+ async _onApGetAnkiConnectVersion() {
+ return await this._anki.getVersion();
+ }
+
async _onApiIsAnkiConnected() {
return await this._anki.isConnected();
}
@@ -786,7 +791,8 @@ class Backend {
}
_onCommandHelp() {
- chrome.tabs.create({url: 'https://foosoft.net/projects/yomichan/'});
+ const url = chrome.runtime.getURL('/bg/info.html');
+ chrome.tabs.create({url});
}
_onCommandOptions(params) {