Fix status icon not always synchronized with vintage/modern setting.

This commit is contained in:
hackademix 2022-03-22 01:35:38 +01:00
parent cc5f9774c9
commit c84a046af0
2 changed files with 7 additions and 5 deletions

View File

@ -165,8 +165,10 @@ var RequestGuard = (() => {
browserAction.setTitle({tabId, title: `NoScript (${numBlocked})`});
return;
}
let iconPath = ns.local.vintageTheme ? '/img/vintage' : '/img';
browserAction.setIcon({tabId, path: {64: `${iconPath}/ui-${icon}64.png`}});
(async () => {
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.setBadgeBackgroundColor({tabId, color: [128, 0, 0, 160]});
browserAction.setTitle({tabId,

View File

@ -294,9 +294,9 @@ span.preset {
outline: 0;
opacity: .6;
margin: 0 .5em 0.13em .5em;
background-size: var(--icon-size);
width: var(--icon-size);
height: var(--icon-size);
background-size: contain;
width: var(--line-size);
height: var(--line-size);
}
#presets-sizer {