diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-10-03 16:46:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 16:46:22 -0400 |
commit | e3986196e13cdac60c3b6a4875e38305b7e47436 (patch) | |
tree | ba140aa318488bfd8d4c7acb1d3cee50b0cd8a97 /ext/js/background | |
parent | be8ef53e90c3893dc2696b846dadb185be8c4514 (diff) |
Disable background clipboard monitor, mecab, and anki if disabled (#1977)
Diffstat (limited to 'ext/js/background')
-rw-r--r-- | ext/js/background/backend.js | 8 |
1 files 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(); |