Open Chrome Extension From External Web Page Button Without Clicking The Browser Extension Button

99 views
Skip to first unread message

Ülkü Tokmak

unread,
May 4, 2018, 8:41:34 AM5/4/18
to Chromium-Extensions-Announce, Dilek AYDEMİR


My web page has a login section. I want the extension to open when the user clicks on the login button. Is it possible? I want to open the extension after logging in directly on my web page without clicking the extension button in the browser.



If you have a sample source, I will be happy   

Psy Chip

unread,
May 4, 2018, 8:50:13 AM5/4/18
to Chromium-Extensions-Announce, dilek.a...@gmail.com
very possible, but not via regular ways. your extension needs to continuously communicate with server and take action after triggered an event at server side.

PhistucK

unread,
May 5, 2018, 4:11:35 AM5/5/18
to ulkut...@gmail.com, Chromium-extensions, dilek.a...@gmail.com
You can declare your extension as "externally_connectable" (in its manifest) for certain hosts (the domain of the page that shows the login button, for example).
Then, you can send a message from the web page to the extension (using chrome.runtime.sendMessage(extensionID, message), I believe, which is available for hosts declared in the "externally_connectable" key) and the extension can do its thing.

PhistucK


On Fri, May 4, 2018 at 3:41 PM Ülkü Tokmak <ulkut...@gmail.com> wrote:


My web page has a login section. I want the extension to open when the user clicks on the login button. Is it possible? I want to open the extension after logging in directly on my web page without clicking the extension button in the browser.



If you have a sample source, I will be happy   

--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/c817b112-6e13-4b7e-b3dd-b4392cc2b5b8%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
Reply all
Reply to author
Forward
0 new messages