Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36 #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixes #36 #37

wants to merge 1 commit into from

Conversation

seedofjoy
Copy link

Fix resetting settings to default when you upgrade your browser.

Fix resetting settings to default when you upgrade your browser.
@jdart
Copy link

jdart commented Aug 17, 2016

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: ''
  });
});

@jdart
Copy link

jdart commented Aug 17, 2016

@vitvad How does my above comment look to you?

@jdart
Copy link

jdart commented Aug 17, 2016

resolves #36

@seedofjoy
Copy link
Author

@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)

@jdart
Copy link

jdart commented Aug 17, 2016

Oh cool, well, I'd love to see this merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants