Uffo
Uffo

Reputation: 10046

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?

Upvotes: 0

Views: 1162

Answers (1)

pimvdb
pimvdb

Reputation: 154838

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.

Upvotes: 1

Related Questions