Can't load jquery in chrome extension

 "content_scripts": [
{
  "matches": ["http://code.jquery.com/*"],
  "js": ["jquery.js", "popup.html"]
}
]

But when I'm reloading the extension, I get an error that the extension could not load jquery.js.What I'm doing wrong?

Answers


It seems like you think you're using http://code.jquery.com/jquery.js, but that's not the case. Your current setup meeans: on any page on http://code.jquery.com, load index.html and jquery.js.

Those files should be saved as part of your extension. jquery.js at least - I don't think you want popup.html to be part of your content script - it is not a JavaScript file, and an extension's popup is something completely different than a content script.


Need Your Help

downloading spring petclinic by installing tomcat 7 maven plugin from command line

java spring maven tomcat

I am trying to download a fresh copy of the java spring petclinic sample application, but am having trouble getting it from the windows 7 command line because the tomcat7 plugin is not installed. I

Instantiating an object to make code faster

java

I have a Utils class that loads a large list of Strings (a static variable) and defines a function that uses this list.