Fix typo in pageAction checks

This commit is contained in:
Les De Ridder 2016-05-26 01:30:32 +02:00
parent e8d76fea7f
commit e57982ce70
1 changed files with 8 additions and 10 deletions

View File

@ -235,22 +235,20 @@ function isCoolUrl(url, callback) {
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
if(tab.active) { if(tab.active) {
isCoolUrl(tab.url, function (cool) { isCoolUrl(tab.url, function (cool) {
if(cool) { if(cool) {
chrome.pageAction.show(tabId); chrome.pageAction.show(tabId);
} }
});
}); });
} }
}); });
chrome.tabs.onActivated.addListener(function(activeInfo) { chrome.tabs.onActivated.addListener(function(activeInfo) {
chrome.tabs.get(activeInfo.tabId, function(tab) { chrome.tabs.get(activeInfo.tabId, function(tab) {
isCoolUrl(tab.url, function(cool) { isCoolUrl(tab.url, function(cool) {
if (cool) { if (cool) {
chrome.pageAction.show(activeInfo.tabId); chrome.pageAction.show(activeInfo.tabId);
} }
});
}); });
}); });
}); });