aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 290b5b05..83eb1f0a 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -47,9 +47,15 @@ function sanitizeOptions(options) {
}
function loadOptions() {
- return new Promise((resolve, reject) => chrome.storage.sync.get(null, resolve));
+ return new Promise((resolve, reject) => {
+ chrome.storage.sync.get(null, opts => {
+ resolve(sanitizeOptions(opts));
+ });
+ });
}
function saveOptions(opts) {
- return new Promise((resolve, reject) => chrome.storage.sync.set(sanitizeOptions(opts), resolve));
+ return new Promise((resolve, reject) => {
+ chrome.storage.sync.set(sanitizeOptions(opts), resolve);
+ });
}