aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/api.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-10 20:46:30 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-10 21:58:53 -0400
commit84bd9ff93b15f419ce1076b7545aeb406917f9b5 (patch)
tree8374573a36784ce12abb7b490ccd9791aea3f2e3 /ext/bg/js/api.js
parent71b700cd22f5a57a07cd2f9a6afa823793f5f95e (diff)
Update settings if a different source triggers optionsUpdate
Diffstat (limited to 'ext/bg/js/api.js')
-rw-r--r--ext/bg/js/api.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index 13c0d73a..81772d08 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -21,11 +21,11 @@ function apiOptionsGet(optionsContext) {
return utilBackend().getOptions(optionsContext);
}
-async function apiOptionsSave() {
+async function apiOptionsSave(source) {
const backend = utilBackend();
const options = await backend.getFullOptions();
await optionsSave(options);
- backend.onOptionsUpdated();
+ backend.onOptionsUpdated(source);
}
async function apiTermsFind(text, optionsContext) {
@@ -139,7 +139,7 @@ async function apiCommandExec(command) {
const optionsContext = {depth: 0};
const options = await apiOptionsGet(optionsContext);
options.general.enable = !options.general.enable;
- await apiOptionsSave();
+ await apiOptionsSave('popup');
}
};