summaryrefslogtreecommitdiff
path: root/ext/bg/js/util.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-03-04 17:56:10 -0800
committerAlex Yatskov <alex@foosoft.net>2017-03-04 17:56:10 -0800
commitb039d300249087aee18c7e8565ae7447d2cf5b15 (patch)
treeba38dfd95b4005cb14953685dc12efc675bc8024 /ext/bg/js/util.js
parentc8eb77cfd9e30625ae33739b7de5a86f59d0457c (diff)
wip
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r--ext/bg/js/util.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index 7a8f15ef..c57f6ae1 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -172,12 +172,20 @@ function optionsVersion(options) {
}
function optionsLoad() {
+ if (!chrome.storage.sync) {
+ chrome.storage.sync = chrome.storage.local;
+ }
+
return new Promise((resolve, reject) => {
chrome.storage.sync.get(null, options => resolve(optionsVersion(options)));
});
}
function optionsSave(options) {
+ if (!chrome.storage.sync) {
+ chrome.storage.sync = chrome.storage.local;
+ }
+
return new Promise((resolve, reject) => {
chrome.storage.sync.set(options, resolve);
});