summaryrefslogtreecommitdiff
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.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 831bb817..4c726730 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -45,10 +45,10 @@ function sanitizeOptions(options) {
return options;
}
-function loadOptions(callback) {
- chrome.storage.sync.get(null, (items) => callback(sanitizeOptions(items)));
+function loadOptions() {
+ return new Promise((resolve, reject) => chrome.storage.sync.get(null, resolve));
}
-function saveOptions(opts, callback) {
- chrome.storage.sync.set(sanitizeOptions(opts), callback);
+function saveOptions(opts) {
+ return new Promise((resolve, reject) => chrome.storage.sync.set(sanitizeOptions(opts), resolve));
}