mirror of https://github.com/gorhill/uBlock.git
Firefox: badge color fix
This commit is contained in:
parent
16218a1609
commit
d660604b8d
|
@ -1491,7 +1491,7 @@ vAPI.toolbarButton.init = function() {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.CUIEvents = {};
|
this.CUIEvents = {};
|
||||||
this.CUIEvents.updateBadge = function() {
|
var updateBadge = function() {
|
||||||
var wId = vAPI.toolbarButton.id;
|
var wId = vAPI.toolbarButton.id;
|
||||||
var buttonInPanel = CustomizableUI.getWidget(wId).areaType === CustomizableUI.TYPE_MENU_PANEL;
|
var buttonInPanel = CustomizableUI.getWidget(wId).areaType === CustomizableUI.TYPE_MENU_PANEL;
|
||||||
|
|
||||||
|
@ -1513,9 +1513,9 @@ vAPI.toolbarButton.init = function() {
|
||||||
|
|
||||||
// Anonymous elements need some time to be reachable
|
// Anonymous elements need some time to be reachable
|
||||||
setTimeout(this.updateBadgeStyle, 250);
|
setTimeout(this.updateBadgeStyle, 250);
|
||||||
};
|
}.bind(this.CUIEvents);
|
||||||
this.CUIEvents.onCustomizeEnd = this.CUIEvents.updateBadge;
|
this.CUIEvents.onCustomizeEnd = updateBadge;
|
||||||
this.CUIEvents.onWidgetUnderflow = this.CUIEvents.updateBadge;
|
this.CUIEvents.onWidgetUnderflow = updateBadge;
|
||||||
|
|
||||||
this.CUIEvents.updateBadgeStyle = function() {
|
this.CUIEvents.updateBadgeStyle = function() {
|
||||||
var css = [
|
var css = [
|
||||||
|
@ -1543,7 +1543,7 @@ vAPI.toolbarButton.init = function() {
|
||||||
|
|
||||||
this.onCreated = function(button) {
|
this.onCreated = function(button) {
|
||||||
button.setAttribute('badge', '');
|
button.setAttribute('badge', '');
|
||||||
setTimeout(this.CUIEvents.updateBadge, 250);
|
setTimeout(updateBadge, 250);
|
||||||
};
|
};
|
||||||
|
|
||||||
CustomizableUI.addListener(this.CUIEvents);
|
CustomizableUI.addListener(this.CUIEvents);
|
||||||
|
|
Loading…
Reference in New Issue