Tab switch event available for Google Chrome extension?
In your manifest.json file add the following:
"permissions":[ "background", "tabs"],"background" : { "scripts": ["scripts/background.js"], "persistent": false}
In your background.js:
chrome.tabs.onActivated.addListener(function(activeInfo) { console.log(activeInfo.tabId);});