From f29f0a0f098f0b6eaef6978eb9cf16e20ab431de Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 15 Jun 2015 15:57:12 -0400 Subject: [PATCH] code review --- platform/firefox/vapi-background.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 897dfbefb..1ca8b737e 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -2085,13 +2085,7 @@ vAPI.toolbarButton.updateState = function(win, tabId) { var icon = this.tabs[tabId]; button.setAttribute('badge', icon && icon.badge || ''); - - if ( !icon || !icon.img ) { - button.classList.add('off'); - } - else { - button.classList.remove('off'); - } + button.classList.toggle('off', !icon || !icon.img); }; /******************************************************************************/