mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
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
Block a user