My Chrome extension manifest is currently as follows: I'm trying to make JQuery library accessible from background.js so I have added it as a content script declaration and within the web_accessible_resources as well. Unfortunately, I still get an $ undefined error message when trying to execute a function defined in background.js and relying on JQuery. Any help or clarification would be greatly appreciated:
I{
"name": "MyApp",
"description": "My app description",
"version": "1.0",
"manifest_version": 3,
"options_ui": {
"page": "options.html",
"open_in_tab": false
},
"background": {
"service_worker": "background.js"
},
"content_scripts": [{
"matches": [ "http://*/*", "https://*/*"],
"js": ["lib/jquery.min.3.5.1.js"]
}],
"web_accessible_resources": [{
"resources": ["lib/jquery.min.3.5.1.js"],
"matches": [],
"extension_ids": []
}],
"permissions": ["storage", "activeTab", "scripting", "tabs", "alarms", "notifications"],
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "images/offline16.png",
"32": "images/offline32.png",
"48": "images/offline48.png",
"128": "images/offline128.png"
}
},
"icons": {
"16": "images/online16.png",
"32": "images/online32.png",
"48": "images/online48.png",
"128": "images/online128.png"
}
}