How to open chrome extension popup automatically?

2,688 views
Skip to first unread message

Sajjad Akhtar

unread,
Aug 15, 2023, 6:12:37 AM8/15/23
to Chromium Extensions
I am creating chrome extension using React JS. I want that when user visits any website my chrome extension should open.

PhistucK

unread,
Aug 15, 2023, 7:57:53 AM8/15/23
to Sajjad Akhtar, Chromium Extensions
The popup that shows up when you click on the extension toolbar icon cannot be opened in any other way.
However, you can create a normal popup window, or add HTML to every page to show your stuff (or open a side panel perhaps, not sure) instead.

PhistucK


On Tue, Aug 15, 2023 at 11:12 AM Sajjad Akhtar <sajjada...@gmail.com> wrote:
I am creating chrome extension using React JS. I want that when user visits any website my chrome extension should open.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/91a2db77-822a-42cb-86a4-05f59d1501cen%40chromium.org.

Sajjad Akhtar

unread,
Aug 15, 2023, 8:08:59 AM8/15/23
to Chromium Extensions, PhistucK, Sajjad Akhtar

okay, Thanks

Zayn Shaheen

unread,
Dec 19, 2023, 6:14:51 AM12/19/23
to Chromium Extensions, PhistucK, Chromium Extensions, Sajjad Akhtar
Hi !
Can I open an extension using option from the contex minu (that one which appers when press right click anywhere in the page)? Because this seem to be directly related to the extension, so I hope that it able to open the popup...

PhistucK

unread,
Dec 19, 2023, 7:46:51 AM12/19/23
to Zayn Shaheen, Chromium Extensions, Sajjad Akhtar
As far as I know, there is no API for opening the popup, so there is no way to open it except by clicking on (or pressing via the keyboard) the button.

PhistucK

Patrick Kettner

unread,
Dec 19, 2023, 8:06:02 AM12/19/23
to PhistucK, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar
Correct, with the caveat that there is chrome.action.openPopup, but at present that is only available to extensions installed via policy.

PhistucK

unread,
Dec 19, 2023, 9:44:41 AM12/19/23
to Patrick Kettner, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar
Oh, good to know. Why is it not spelled out in the linked section, though?

PhistucK

Patrick Kettner

unread,
Dec 19, 2023, 9:49:58 AM12/19/23
to PhistucK, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar
Just an oversight. I opened an issue for this a few days ago, but this portion of the documentation is generated from Chrome's source and due to the holidays it will be a little bit before it is updated.

Gaurang Tandon

unread,
May 7, 2024, 3:22:45 AMMay 7
to Chromium Extensions, Patrick Kettner, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar, PhistucK
Hi Patrick, can you share when is it planned to update chrome.action.openPopup to not require a policy install? I checked the linked issue https://issues.chromium.org/issues/40057101 and I couldn't find any mentions of removing the policy restriction.

Oliver Dunk

unread,
May 7, 2024, 4:47:54 AMMay 7
to Gaurang Tandon, Chromium Extensions, Patrick Kettner, Zayn Shaheen, Sajjad Akhtar, PhistucK
Hi Gaurang,

There isn't a timeline for this I'm afraid. It is something we all want (I was very keen as a developer before I joined Google!) but we need to make sure the API is ready and in particular that we address some security concerns we had with the initial implementation.

We're continuing to work on that and will definitely shout as soon as something is available!
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


Gaurang Tandon

unread,
May 7, 2024, 6:27:13 AMMay 7
to Chromium Extensions, Oliver Dunk, Chromium Extensions, Patrick Kettner, Zayn Shaheen, Sajjad Akhtar, PhistucK, Gaurang Tandon
Thanks for the quick response! 🙂 I look forward to the API availability.

PhistucK

unread,
Jun 23, 2024, 12:47:50 PM (6 days ago) Jun 23
to Patrick Kettner, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar
And only when experimental extension APIs are enabled...

PhistucK


On Tue, Dec 19, 2023 at 1:05 PM Patrick Kettner <patrick...@google.com> wrote:

Jackie Han

unread,
Jun 23, 2024, 2:08:30 PM (6 days ago) Jun 23
to PhistucK, Patrick Kettner, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar
chrome.action.openPopup() is available on Chrome 127 (without policy)

PhistucK

unread,
Jun 23, 2024, 2:36:28 PM (6 days ago) Jun 23
to Jackie Han, Patrick Kettner, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar
And without a command line flag?

PhistucK

Jackie Han

unread,
Jun 23, 2024, 2:49:51 PM (6 days ago) Jun 23
to PhistucK, Patrick Kettner, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar

PhistucK

unread,
Jun 23, 2024, 2:51:22 PM (6 days ago) Jun 23
to Jackie Han, Patrick Kettner, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar
Nice, thank you!

PhistucK

Oliver Dunk

unread,
Jun 24, 2024, 4:55:29 AM (5 days ago) Jun 24
to PhistucK, Jackie Han, Patrick Kettner, Zayn Shaheen, Chromium Extensions, Sajjad Akhtar
Yes, as Jackie mentioned we are finally launching this in Chrome 127! I'm excited.
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB

Reply all
Reply to author
Forward
0 new messages