remove references to chrome.storage.sync
This commit is contained in:
parent
73fcc5a957
commit
e8a993bf35
@ -210,15 +210,7 @@ function optionsLoad() {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
chrome.storage.local.get(null, store => resolve(store.options));
|
chrome.storage.local.get(null, store => resolve(store.options));
|
||||||
}).then(optionsStr => {
|
}).then(optionsStr => {
|
||||||
if (optionsStr) {
|
return optionsStr ? JSON.parse(optionsStr) : {};
|
||||||
return JSON.parse(optionsStr);
|
|
||||||
} else if (chrome.storage.sync) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
chrome.storage.sync.get(null, options => resolve(options));
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
return {};
|
return {};
|
||||||
}).then(options => {
|
}).then(options => {
|
||||||
|
Loading…
Reference in New Issue
Block a user