Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

can we add jquery in chrome extension js code

You can just put jquery.js into extension folder and include it in the manifest:

{
  "name": "My extension",
  ...
  "content_scripts": [
    {
      "matches": ["http://www.google.com/*"],
      "css": ["mystyles.css"],
      "js": ["jquery.js", "myscript.js"]
    }
  ],
  ...
}
You don't need to worry about conflicts with jQuery on a parent page as content scripts are sandboxed.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #jquery #chrome #extension #js #code
ADD COMMENT
Topic
Name
3+2 =