Reputation: 1449
I created a script that add functions to a site, wherever it uses variables and functions from this site including jQuery. I tried to attach this script to the site through of Chrome Extension. But the extension don't work. I read about this limitation on http://code.google.com/chrome/extensions/content_scripts.html . Do have another manner to do this?
My English is poor, and I can't understanding alright the examples on net.
Upvotes: 0
Views: 322
Reputation: 15269
Could you add some code to your question and explain what problem you're having?
It's very hard to know what's going wrong with your extension without seeing any code or knowing what your goal is, or what's going wrong.
If you're having trouble using jQuery, make sure you've included it in the manifest, something like this:
{
"name" : "Foo",
"version" : "1.0.0",
"description" : "Do some foo thing",
"content_scripts" : [
{
"matches" : [
"http://*/*",
"https://*/*"
],
"js" : ["js/jquery-1.6.1.js", "js/myContentscript.js"],
"run_at" : "document_end"
}
],
"icons" : {
"16" : "images/16.png",
"22" : "images/22.png",
"32" : "images/32.png",
"48" : "images/48.png",
"128" : "images/128.png"
}
}
Also make sure the jQuery file is actually in your package.
Upvotes: 1