Clean up disabled Private Mode notice. Fixes #878

This commit is contained in:
Jonathan Kingston
2017-09-29 16:59:51 +01:00
parent c1e9cc3c56
commit c433c6b39e
4 changed files with 11 additions and 37 deletions
+7 -6
View File
@@ -4,12 +4,13 @@ const badge = {
const currentWindow = await browser.windows.getCurrent();
this.displayBrowserActionBadge(currentWindow.incognito);
},
async displayBrowserActionBadge(disable) {
if (disable) {
browser.browserAction.disable();
} else {
browser.browserAction.enable();
}
disableAddon(tabId) {
browser.browserAction.disable(tabId);
browser.browserAction.setTitle({ tabId, title: "Containers disabled in Private Browsing Mode" });
},
async displayBrowserActionBadge() {
const extensionInfo = await backgroundLogic.getExtensionInfo();
const storage = await browser.storage.local.get({browserActionBadgesClicked: []});