1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 18:32:30 +01:00

Merge pull request #1239 from AlexVallat/Fix_1233

Fix for #1233
This commit is contained in:
AlexVallat 2015-04-11 20:06:28 +01:00
commit 66c668a547

View File

@ -1471,11 +1471,16 @@ vAPI.toolbarButton.init = function() {
this.defaultArea = CustomizableUI.AREA_NAVBAR;
this.styleURI = [
'#' + this.id + ' {',
'#' + this.id + '.off {',
'list-style-image: url(',
vAPI.getURL('img/browsericons/icon16-off.svg'),
');',
'}',
'#' + this.id + ' {',
'list-style-image: url(',
vAPI.getURL('img/browsericons/icon16.svg'),
');',
'}',
'#' + this.viewId + ', #' + this.viewId + ' > iframe {',
'width: 160px;',
'height: 290px;',
@ -1679,16 +1684,15 @@ vAPI.toolbarButton.updateState = function(win, tabId) {
}
var icon = this.tabs[tabId];
button.setAttribute('badge', icon && icon.badge || '');
if ( !icon || !icon.img ) {
icon = '';
button.classList.add('off');
}
else {
icon = 'url(' + vAPI.getURL('img/browsericons/icon16.svg') + ')';
button.classList.remove('off');
}
button.style.listStyleImage = icon;
};
/******************************************************************************/