Merge branch 'master' of https://github.com/chrisaljoudi/uBlock into chrisaljoudi

This commit is contained in:
gorhill 2015-04-11 16:32:44 -04:00
commit b27f87dee0
1 changed files with 9 additions and 5 deletions

View File

@ -1468,11 +1468,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;',
@ -1676,16 +1681,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;
};
/******************************************************************************/