Jiew Meng
Jiew Meng

Reputation: 88207

jQuery only defined in contentScripts?

Is jQuery only available in contentScripts? like

tabs.activeTab.attach({
    contentScript: 'jQuery("body").html("<img src=\'' + imgdata + '\' />")'
});

cos when I try using jQuery outside, I get "jQuery is not defined"

Upvotes: 4

Views: 337

Answers (1)

Ricky
Ricky

Reputation: 5377

Yes that is correct. The contentScripts are the only ones that have access to the actual page. You may want to check out PageMods as well.

Upvotes: 2

Related Questions