diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-10-03 16:46:22 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-10-10 20:37:51 -0400 |
commit | 596eb199d975267f5971b2480aea9afcacfc7688 (patch) | |
tree | f7547d5796ee809c73d0865467b0db445e80827c /ext | |
parent | d14268eb574d39b5ecc1e83302d45d5933770a73 (diff) |
Disable background clipboard monitor, mecab, and anki if disabled (#1977)
Diffstat (limited to 'ext')
-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(); |