From 152b1de7e9bb90a3ec1cd2a3fbb153b0decc200d Mon Sep 17 00:00:00 2001 From: narcolepticinsomniac Date: Mon, 13 Feb 2017 05:26:54 -0500 Subject: [PATCH] Differentiate icon for "global disabled" and "no active styles" --- messaging.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messaging.js b/messaging.js index 6ddf3982..b6f09893 100644 --- a/messaging.js +++ b/messaging.js @@ -45,7 +45,7 @@ function updateIcon(tab, styles) { function stylesReceived(styles) { var disableAll = "disableAll" in styles ? styles.disableAll : prefs.get("disableAll"); - var postfix = styles.length == 0 || disableAll ? "w" : ""; + var postfix = disableAll ? "x" : "" || styles.length == 0 ? "w" : ""; chrome.browserAction.setIcon({ path: { // Material Design 2016 new size is 16px @@ -60,7 +60,7 @@ function updateIcon(tab, styles) { if (!chrome.runtime.lastError) { var t = prefs.get("show-badge") && styles.length ? ("" + styles.length) : ""; chrome.browserAction.setBadgeText({text: t, tabId: tab.id}); - chrome.browserAction.setBadgeBackgroundColor({color: disableAll ? "#aaa" : '#006666'}); + chrome.browserAction.setBadgeBackgroundColor({color: disableAll ? "darkred" : '#006666'}); } }); //console.log("Tab " + tab.id + " (" + tab.url + ") badge text set to '" + t + "'.");