0

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.

Blaze_droid
  • 479
  • 4
  • 13
  • Extensions can't inject on chrome pages so you'll have to show a separate window. – wOxxOm Apr 18 '21 at 04:31
  • Yeah i can do that but i don't want to do so. I want to show a popup, because popups are allowed on that pages – Blaze_droid Apr 18 '21 at 05:02
  • Well, like I said you can't do it in a published extension. For a personal extension there's a [workaround](https://stackoverflow.com/a/19046796). – wOxxOm Apr 18 '21 at 05:45
  • I am currently making it for my personal use, but if it worked correcly, i should publish it. And thanks you for giving me direction :) – Blaze_droid Apr 18 '21 at 05:51

0 Answers0