diff --git a/background.js b/background.js index 39b0c94..22903d3 100644 --- a/background.js +++ b/background.js @@ -235,22 +235,20 @@ function isCoolUrl(url, callback) { chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { if(tab.active) { - isCoolUrl(tab.url, function (cool) { - if(cool) { - chrome.pageAction.show(tabId); - } - }); + isCoolUrl(tab.url, function (cool) { + if(cool) { + chrome.pageAction.show(tabId); + } }); } }); chrome.tabs.onActivated.addListener(function(activeInfo) { chrome.tabs.get(activeInfo.tabId, function(tab) { - isCoolUrl(tab.url, function(cool) { - if (cool) { - chrome.pageAction.show(activeInfo.tabId); - } - }); + isCoolUrl(tab.url, function(cool) { + if (cool) { + chrome.pageAction.show(activeInfo.tabId); + } }); }); });