diff options
-rw-r--r-- | background.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/background.js b/background.js index 4d94e69..1f0225c 100644 --- a/background.js +++ b/background.js @@ -79,10 +79,16 @@ function updateCerts() { const getting = browser.storage.sync.get("certs"); getting.then(saved => { certs = saved.certs; - console.log("certs=" + certs) + // Reset all tab data + browser.tabs.query({}).then(tabs => { + for (let tab of tabs) { + browser.browserAction.setIcon({ tabId: tab.id }); + browser.browserAction.setBadgeText({ text: "", tabId: tab.id }); + } + }, console.error); }, console.error) } // Listen to config change for certs list -browser.storage.local.onChanged.addListener(() => updateCerts()); +browser.storage.sync.onChanged.addListener(() => updateCerts()); // Initial config fetch updateCerts();
\ No newline at end of file |