aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-07 11:21:06 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-10 20:09:33 -0400
commit91bc31d7582fb54908433cd8b6e46b5a0be4e9b3 (patch)
treeefdb9c07bf7c0b286ef19aaebf6b72a8f83f91af /ext/bg/js/backend.js
parentcc53510883b5c5f75069655df6a6733ff1bd002a (diff)
Change how options updates are handled on the frontend
Only an 'optionsUpdate' signal is now sent to the frontend with empty data. The frontend then responds by performing apiOptionsGet to update the options. This makes it so that there is only a single function which is responsible for requesting options from the backend.
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index b3e737da..0394c4ec 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -59,7 +59,7 @@ class Backend {
const callback = () => this.checkLastError(chrome.runtime.lastError);
chrome.tabs.query({}, tabs => {
for (const tab of tabs) {
- chrome.tabs.sendMessage(tab.id, {action: 'optionsSet', params: {options}}, callback);
+ chrome.tabs.sendMessage(tab.id, {action: 'optionsUpdate', params: {}}, callback);
}
});
}