1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Fixed: Counter doesn't work (Chromium only) (#320)

This commit is contained in:
nobody
2021-03-21 08:08:03 +01:00
parent df00b7ba77
commit 3db5008e35
2 changed files with 22 additions and 12 deletions

View File

@@ -67,14 +67,21 @@ wrappers.setBadgeMissing = function (tabIdentifier, counter) {
'tabId': tabIdentifier,
'text': `${counter}`,
});
chrome.browserAction.setBadgeTextColor({
'tabId': tabIdentifier,
'color': 'black',
});
chrome.browserAction.setBadgeBackgroundColor({
'tabId': tabIdentifier,
'color': 'yellow',
});
if (BrowserType.FIREFOX) {
chrome.browserAction.setBadgeTextColor({
'tabId': tabIdentifier,
'color': 'black',
});
chrome.browserAction.setBadgeBackgroundColor({
'tabId': tabIdentifier,
'color': 'yellow',
});
} else {
chrome.browserAction.setBadgeBackgroundColor({
'tabId': tabIdentifier,
'color': 'red',
});
}
};
wrappers.defaultBadge = function (tabIdentifier, counter) {
@@ -82,10 +89,12 @@ wrappers.defaultBadge = function (tabIdentifier, counter) {
'tabId': tabIdentifier,
'text': `${counter}`,
});
chrome.browserAction.setBadgeTextColor({
'tabId': tabIdentifier,
'color': wrappers.textColor
});
if (BrowserType.FIREFOX) {
chrome.browserAction.setBadgeTextColor({
'tabId': tabIdentifier,
'color': wrappers.textColor
});
}
chrome.browserAction.setBadgeBackgroundColor({
'tabId': tabIdentifier,
'color': wrappers.backgroundColor