show 'NEW' icon badge for major upgrades

This commit is contained in:
groovecoder
2017-05-11 11:45:39 -05:00
parent 8f80b527f5
commit 4a48a7debb
5 changed files with 18 additions and 2 deletions
+7
View File
@@ -467,6 +467,13 @@ browser.runtime.sendMessage({
}
}).catch(() => {});
browser.runtime.sendMessage({method: "checkForMajorUpgrade"}).then(upgrading=> {
if (upgrading) {
browser.browserAction.setBadgeBackgroundColor({color: "rgba(0,217,0,255)"});
browser.browserAction.setBadgeText({text: "NEW"});
}
}).catch((e) => { throw e;});
function disableAddon(tabId) {
browser.browserAction.disable(tabId);
browser.browserAction.setTitle({ tabId, title: "Containers disabled in Private Browsing Mode" });