Hi I’m trying to create a new tab in my background script, and inject a content script (for now its just a regular alert to check the code), but I cant manage to do that since
Content scripts cant be injected into nealy created tabs that follow the chrome-extensions:// scheme and the CSP blocks me if I try to use inline script.
So to conclude:
I’d like to create a new tab from a background script and inject content script into the newly created tab.
my manifest:
{
"manifest_version": 3,
"name": "OSINTisizer",
"description": "OSINT any IP or URL",
"version": "1.20",
"icons": {
"48": "images/logo_48.png",
"128": "images/logo_128.png"
},
"background": {
"service_worker": "background.js"
},
"content_scripts": [
{
"matches": ["https://*/report.html"],
"js": ["report.js"]
}
],
"permissions": [
"contextMenus",
"background",
"scripting",
"tabs",
"storage"
],
"host_permissions": [
"*://*/*"
]
}
My background.js code snippet that is relevant:
chrome.storage.local.set({ info: uniqeEmails }, function () {});
chrome.tabs.create({ url: "report.html" });
});
});