Search code examples
google-chrome-extension

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!


Solution

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

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