chrome.tabs.getSelected is undefined on latest Chrome that uses manifest version 2?
EDIT: Sorry, just realized you can't use chrome.tabs
in a content script. You'll have to message the extension's background page for access to that. Here's some info about messaging: https://developer.chrome.com/extensions/messaging.html.