aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-01-12 20:14:05 -0800
committerAlex Yatskov <alex@foosoft.net>2017-01-12 20:14:05 -0800
commit94034890cc21a57e3ea579aab3eaa88ae3aab360 (patch)
treea61d88364da2a50937f604fb44b54c75fb8cec2f /ext/bg/js/yomichan.js
parentc574ef4bc035947aac304b19101a791db3a8b91f (diff)
WIP
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index 2cdcf1c8..7debd9f3 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -94,13 +94,10 @@ class Yomichan {
setOptions(options) {
this.options = options;
- switch (options.ankiMethod) {
- case 'ankiconnect':
- this.anki = new AnkiConnect();
- break;
- default:
- this.anki = new AnkiNull();
- break;
+ if (options.ankiEnable) {
+ this.anki = new AnkiConnect();
+ } else {
+ this.anki = new AnkiNull();
}
this.tabInvokeAll('setOptions', this.options);