Chromium: Badge color for missing resources (#1031)

This commit is contained in:
nobody 2022-07-22 18:55:48 +02:00
parent 659430da84
commit 465d7d40ea
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
2 changed files with 14 additions and 13 deletions

View File

@ -82,11 +82,6 @@ wrappers.setIcon = function (details, type) {
wrappers.setBadgeColoring = function (tabId, value) {
let textColor, backgroundColor;
if (chrome.browserAction.setBadgeBackgroundColor === undefined ||
chrome.browserAction.setBadgeTextColor === undefined) {
return;
}
if (value === BadgeSettingHTMLFilter.TYPE) {
textColor = wrappers.badgeHTMLfilterTextColor;
backgroundColor = wrappers.badgeHTMLFilterBackgroundColor;
@ -100,12 +95,17 @@ wrappers.setBadgeColoring = function (tabId, value) {
return;
}
chrome.browserAction.setBadgeTextColor({
'tabId': tabId,
'color': textColor
});
chrome.browserAction.setBadgeBackgroundColor({
'tabId': tabId,
'color': backgroundColor
});
if (chrome.browserAction.setBadgeTextColor !== undefined) {
chrome.browserAction.setBadgeTextColor({
'tabId': tabId,
'color': textColor
});
}
if (chrome.browserAction.setBadgeBackgroundColor !== undefined) {
chrome.browserAction.setBadgeBackgroundColor({
'tabId': tabId,
'color': backgroundColor
});
}
};

View File

@ -58,6 +58,7 @@
<ul>
<li>Custom block screen (<a href="https://codeberg.org/nobody/LocalCDN/issues/1050">#1050</a>)</li>
<li>Banner for chromium based browser (<a href="https://codeberg.org/nobody/LocalCDN/issues/1068">#1068</a>)</li>
<li>Chromium: Badge color for missing resources (<a href="https://codeberg.org/nobody/LocalCDN/issues/1031">#1031</a>)</li>
</ul>
<p>Removed</p>
<ul>