I am looking to dynamically load different content scripts based on the currently selected page and tab. Currently, I have three content scripts at my disposal. My goal is to utilize two of them for one specific page and the third script for another page.
For Page 1:
content_script.js
load_content_script.js
For Page 2:
newtab_content_script.js
As of now, my manifest appears as follows:
{
"name": "Custom Plugin for AdData Express. Quickly generate Excel documents from selected brands.",
"version": "1.0",
"background_page": "background.html",
"permissions": [
"cookies",
"tabs",
"http://*/*", "https://*", "*", "http://*/*", "https://*/*",
"http://www.addataexpress.com", "http://www.addataexpress.com/*"
],
"content_scripts": [
{
"matches": ["<all_urls>", "http://*/*", "https://*/*"],
"js": ["load_content_script.js", "content_script.js", "newtab_content_script.js", "jquery.min.js", "json.js"]
}
],
"browser_action": {
"name": "AdData Express Plugin",
"default_icon": "icon.png",
"js": "jquery.min.js",
"popup": "popup.html"
}
}
What modifications should I make to the manifest or elsewhere to achieve this conditional loading of content scripts?