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

Update page on toggle of attributes #2

Open
willprice opened this issue Jul 30, 2015 · 1 comment
Open

Update page on toggle of attributes #2

willprice opened this issue Jul 30, 2015 · 1 comment

Comments

@willprice
Copy link
Collaborator

Something using the listener:

      chrome.storage.onChanged.addListener(function(changes, namespace) {
        for (key in changes) {
          var storageChange = changes[key];
          console.log('Storage key "%s" in namespace "%s" changed. ' +
                      'Old value was "%s", new value is "%s".',
                      key,
                      namespace,
                      storageChange.oldValue,
                      storageChange.newValue);
        }
      });

If you want to extend it a bit.
You'd also need to keep track of hidden elements, and then unhide before hiding them again based on the new checked/unchecked preferences

@Benpogo75
Copy link
Collaborator

All done

On 30 July 2015 at 21:45, Will Price [email protected] wrote:

Something using the listener:

  chrome.storage.onChanged.addListener(function(changes, namespace) {
    for (key in changes) {
      var storageChange = changes[key];
      console.log('Storage key "%s" in namespace "%s" changed. ' +
                  'Old value was "%s", new value is "%s".',
                  key,
                  namespace,
                  storageChange.oldValue,
                  storageChange.newValue);
    }
  });

If you want to extend it a bit.
You'd also need to keep track of hidden elements, and then unhide before
hiding them again based on the new checked/unchecked preferences


Reply to this email directly or view it on GitHub
#2
.

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

No branches or pull requests

2 participants