My manifest.json contains
"content_scripts": [
{
"matches": ["http://www.facebook.com/*","https://www.facebook.com/*"],
"js": ["js/jquery-1.7.2.min.js", "js/jquery.livequery.min.js", "js/script.js"]
}
]
and the contents of script.js are
$("#FB_HiddenContainer").livequery(function(){
chrome.tabs.create({"url":"http://www.google.com"});
});
When i open facebook, console reports an error
Uncaught TypeError: Cannot call method 'create' of undefined
at
chrome-extension://whateveristhisweirdcode/js/script.js:2
How can i make it open a new tab??