mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Moved localconfig to SB object
This commit is contained in:
parent
272698f97b
commit
2917de6776
1 changed files with 3 additions and 3 deletions
6
utils.js
6
utils.js
|
@ -13,7 +13,7 @@ function configProxy() {
|
|||
})
|
||||
},
|
||||
get: function(obj, prop) {
|
||||
return localconfig[prop]
|
||||
return SB.localconfig[prop]
|
||||
}
|
||||
};
|
||||
return new Proxy({}, handler);
|
||||
|
@ -21,13 +21,13 @@ function configProxy() {
|
|||
|
||||
fetchConfig = _ => new Promise(function(resolve, reject) {
|
||||
chrome.storage.sync.get(null, function(items) {
|
||||
localconfig = items; // Data is ready
|
||||
SB.localconfig = items; // Data is ready
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
||||
async function config() {
|
||||
localconfig = {};
|
||||
SB.localconfig = {};
|
||||
await fetchConfig();
|
||||
SB.config = configProxy();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue