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
+5
View File
@@ -8,6 +8,8 @@ const DEFAULT_TAB = "about:newtab";
const SHOW_MENU_TIMEOUT = 100;
const HIDE_MENU_TIMEOUT = 300;
const MAJOR_VERSIONS = ["2.2.1"];
const INCOMPATIBLE_ADDON_IDS = [
"pulse@mozilla.com",
"snoozetabs@mozilla.com",
@@ -256,6 +258,9 @@ const ContainerService = {
webExtension.startup().then(api => {
api.browser.runtime.onMessage.addListener((message, sender, sendReply) => {
if (message.method === "checkForMajorUpgrade") {
sendReply(reason === "upgrade" && MAJOR_VERSIONS.indexOf(self.version) > -1);
}
if ("method" in message && methods.indexOf(message.method) !== -1) {
sendReply(this[message.method](message));
}