Reputation: 141
Can you please let me know how I can add a jQuery plugin into a Google Chrome extension manifest.json
file?
{
"manifest_version": 2,
"name": "One Pass",
"description": "This is a Development.",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"https://secure.flickr.com/"
]
}
Thanks,
Upvotes: 0
Views: 5666
Reputation: 1691
You would need to add it as a content script. It's very well documented in the chrome : http://developer.chrome.com/extensions/tut_migration_to_manifest_v2.html. Easiest is to keep a local copy of jquery and ship it with the extension and then refer it in your manifest.json like so :
"content_scripts": [
{
"all_frames": false,
"matches": ["<all_urls>"],
"exclude_matches": [],
"js": [
"js/lib/jquery.js"
],
"css": [
"js/content/page.css"
]
}
]
Upvotes: 3