Situation : I am writing a chrome extension that works on any page.
Problem Question : I can not load jQuery into Facebook and I wo
The Answer
It seems my 'experimental method' was flawed. The assumption about the Chrome console's omniscience is incorrect. The Chrome console does not appear to have access to the content script's execution context. So although console was reporting that jQuery did not have access to the page, it actually did, from the content script's execution context.
This was verified by adding a content script, test.js, to manifest.json :
"content_scripts" : [
{
"matches" : [""],
"js" : [
"javascript/jq/jquery-1.9.1.min.js",
"javascript/jq/non-standard.js",
"javascript/test.js" // <-- add
],
The content of test.js is :
var jtest = $('body');
alert(jtest);
alert(jtest.text());
Now whatever page I navigate to, the two alert boxes pop up as expected.
It works!