From 58969917185dac0dc166aa7d79a694e0f9e8beb2 Mon Sep 17 00:00:00 2001 From: AlexVallat Date: Sat, 11 Apr 2015 19:12:10 +0100 Subject: [PATCH] Fix for #1233 --- platform/firefox/vapi-background.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index e4404bfa8..578523e65 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -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; }; /******************************************************************************/