aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/util.js
diff options
context:
space:
mode:
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);
});