Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
Disable background clipboard monitor, mecab, and anki if disabled (#1977
Browse files Browse the repository at this point in the history
)
  • Loading branch information
toasted-nutbread committed Oct 11, 2021
1 parent d14268e commit 596eb19
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ext/js/background/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 596eb19

Please sign in to comment.