From e3986196e13cdac60c3b6a4875e38305b7e47436 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 3 Oct 2021 16:46:22 -0400 Subject: Disable background clipboard monitor, mecab, and anki if disabled (#1977) --- ext/js/background/backend.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index e76f4cfe..098bc3ab 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -978,12 +978,14 @@ class Backend { const options = this._getProfileOptions({current: true}); this._updateBadge(); + const enabled = options.general.enable; + this._anki.server = options.anki.server; - this._anki.enabled = options.anki.enable; + this._anki.enabled = options.anki.enable && enabled; - this._mecab.setEnabled(options.parsing.enableMecabParser); + this._mecab.setEnabled(options.parsing.enableMecabParser && enabled); - if (options.clipboard.enableBackgroundMonitor) { + if (options.clipboard.enableBackgroundMonitor && enabled) { this._clipboardMonitor.start(); } else { this._clipboardMonitor.stop(); -- cgit v1.2.3