[TabGuard] "TG" badge on the NoScript icon when the selected tab is anonymized.

This commit is contained in:
hackademix 2023-06-14 23:19:46 +02:00
parent 3d00084ed5
commit de872964e9
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
1 changed files with 5 additions and 1 deletions

View File

@ -169,7 +169,11 @@ var RequestGuard = (() => {
let iconPath = (await Themes.isVintage()) ? '/img/vintage' : '/img';
browserAction.setIcon({tabId, path: {64: `${iconPath}/ui-${icon}64.png`}});
})();
browserAction.setBadgeText({tabId, text: showBadge ? numBlocked.toString() : ""});
browserAction.setBadgeText({
tabId,
text: TabGuard.isAnonymizedTab(tabId) ? "TG" : showBadge ? numBlocked.toString() : ""
});
browserAction.setBadgeBackgroundColor({tabId, color: [128, 0, 0, 160]});
browserAction.setTitle({tabId,
title: UA.mobile ? "NoScript" : `${VERSION_LABEL} \n${enforced ?