From e8a993bf35c6d87106ebe3d6c2487c0ef2d9636b Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 11 Mar 2017 18:39:01 -0800 Subject: remove references to chrome.storage.sync --- ext/bg/js/util.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index f9b221b3..d9bd76c5 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -210,15 +210,7 @@ function optionsLoad() { return new Promise((resolve, reject) => { chrome.storage.local.get(null, store => resolve(store.options)); }).then(optionsStr => { - if (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 {}; - } + return optionsStr ? JSON.parse(optionsStr) : {}; }).catch(error => { return {}; }).then(options => { -- cgit v1.2.3