mirror of https://github.com/gorhill/uBlock.git
code review
This commit is contained in:
parent
13a5495f28
commit
f29f0a0f09
|
@ -2085,13 +2085,7 @@ vAPI.toolbarButton.updateState = function(win, tabId) {
|
||||||
var icon = this.tabs[tabId];
|
var icon = this.tabs[tabId];
|
||||||
|
|
||||||
button.setAttribute('badge', icon && icon.badge || '');
|
button.setAttribute('badge', icon && icon.badge || '');
|
||||||
|
button.classList.toggle('off', !icon || !icon.img);
|
||||||
if ( !icon || !icon.img ) {
|
|
||||||
button.classList.add('off');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
button.classList.remove('off');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue