I am making a chrome extension and i want to show a popup on chrome pages (e.g., chrome://newtab
) and inject js on other pages (e.g., http://example.com
).
I am able to inject js on other pages like this in the manifest.json
:
...
"content_scripts": [
{
"matches": ["http://example.com/", "<all_urls>"],
"js": ["src/inject/inject.js"]
}
],
...
But chrome wouldn't let the extension to inject js on the chrome://
pages, So i want to show a popup on that pages.
So, Someone tell me how do i achieve this?
Thanks in advance.