I started trying to write chrome extension and I'm having problem with simple function:
script inside "backgroound.html":
chrome.tabs.onUpdated.addListener(function(tabId,changedInfo,tab){alert("a")}); manifest.json file:
{ "name": "ogys", "version": "1.0", "description": "description", "browser_action": { "default_icon": "icon.png", "background_page": "background.html" }, "permissions": ["tabs", "http://code.google.com/"] } I understand that an change on any tab would trigger the event but nothing happends.
console.log()instead ofalert(). Not sure whether an alert on the background page is even visible. You can open the console for the background page on the add-ons page, you will see the log messages then.