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, 'tabId': tabIdentifier,
'text': `${counter}`, 'text': `${counter}`,
}); });
chrome.browserAction.setBadgeTextColor({ if (BrowserType.FIREFOX) {
'tabId': tabIdentifier, chrome.browserAction.setBadgeTextColor({
'color': 'black', 'tabId': tabIdentifier,
}); 'color': 'black',
chrome.browserAction.setBadgeBackgroundColor({ });
'tabId': tabIdentifier, chrome.browserAction.setBadgeBackgroundColor({
'color': 'yellow', 'tabId': tabIdentifier,
}); 'color': 'yellow',
});
} else {
chrome.browserAction.setBadgeBackgroundColor({
'tabId': tabIdentifier,
'color': 'red',
});
}
}; };
wrappers.defaultBadge = function (tabIdentifier, counter) { wrappers.defaultBadge = function (tabIdentifier, counter) {
@@ -82,10 +89,12 @@ wrappers.defaultBadge = function (tabIdentifier, counter) {
'tabId': tabIdentifier, 'tabId': tabIdentifier,
'text': `${counter}`, 'text': `${counter}`,
}); });
chrome.browserAction.setBadgeTextColor({ if (BrowserType.FIREFOX) {
'tabId': tabIdentifier, chrome.browserAction.setBadgeTextColor({
'color': wrappers.textColor 'tabId': tabIdentifier,
}); 'color': wrappers.textColor
});
}
chrome.browserAction.setBadgeBackgroundColor({ chrome.browserAction.setBadgeBackgroundColor({
'tabId': tabIdentifier, 'tabId': tabIdentifier,
'color': wrappers.backgroundColor 'color': wrappers.backgroundColor

View File

@@ -35,6 +35,7 @@
<li>Fixed: Google Material Icons cannot be loaded (<a href="https://codeberg.org/nobody/LocalCDN/issues/316">#316</a>)</li> <li>Fixed: Google Material Icons cannot be loaded (<a href="https://codeberg.org/nobody/LocalCDN/issues/316">#316</a>)</li>
<li>Updated: noUiSlider v14.6.3 -> v14.6.4 (<a href="https://codeberg.org/nobody/LocalCDN/issues/317">#317</a>)</li> <li>Updated: noUiSlider v14.6.3 -> v14.6.4 (<a href="https://codeberg.org/nobody/LocalCDN/issues/317">#317</a>)</li>
<li>Updated: highlight.js v10.6.0 -> v10.7.0 (<a href="https://codeberg.org/nobody/LocalCDN/issues/319">#319</a>)</li> <li>Updated: highlight.js v10.6.0 -> v10.7.0 (<a href="https://codeberg.org/nobody/LocalCDN/issues/319">#319</a>)</li>
<li>Fixed: Counter doesn't work (Chromium only) (<a href="https://codeberg.org/nobody/LocalCDN/issues/320">#320</a>)</li>
</ul> </ul>
<div id="generator-section"> <div id="generator-section">
<div class="topic-label"> <div class="topic-label">