Open seedofjoy opened 8 years ago
Those defaults might be set for a reason, maybe something like the below would be safer. This is completely untested!
chrome.storage.local.get('active', function(value) {
if (!chrome.runtime.lastError) // storage already set
return;
chrome.storage.local.set({
active: false,
urls: ["<all_urls>"],
exposedHeaders: ''
});
});
@vitvad How does my above comment look to you?
resolves #36
@jdart my code doesn't broke anything because of this:
chrome.storage.local.get({'active': false, 'urls': ["<all_urls>"], 'exposedHeaders': ''}, function(result) {
- this is single place where settings are used (with default settings)
Oh cool, well, I'd love to see this merged!
Fix resetting settings to default when you upgrade your browser.