(function() { chrome.tabs.onUpdated.addListener(function(tabId, changed, info) { return chrome.pageAction.show(tabId); }); chrome.pageAction.onClicked.addListener(function(tab) { return alert("The page action was clicked on tab: " + tab.title); }); }).call(this);