esqew
esqew

Reputation: 44710

jQuery in Google Chrome Content Script?

How would I go about including the jQuery library in my Google Chrome Content Script? I have tried, fruitlessly, of course. Should I use <script src="..." /></script>, or is there a different/better way to go about it? Thanks in advance!

Upvotes: 60

Views: 38821

Answers (1)

Grant
Grant

Reputation: 1134

You need to load it in your manifest.json, like this:

  "content_scripts": [
    {
      "matches": ["http://*/*","https://*/*"],
      "js": ["jquery-1.4.2.js", "extension.js"]
    }
  ]

Upvotes: 87

Related Questions