diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-09-13 13:38:37 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-09-13 13:38:37 -0700 |
commit | cd4f16c096746d13502dc7b258dfe16c97344ba1 (patch) | |
tree | 0f601e128da4632440b9e2a568f9b1acbc759b0a /ext/bg/js/options.js | |
parent | 540d0e239c9b7dc5bee8a3e53bcf6ec0767ee80b (diff) |
Options cleanup
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r-- | ext/bg/js/options.js | 8 |
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)); } |