diff options
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r-- | ext/bg/js/yomichan.js | 11 |
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); |