Yura F Kleban
Yura F Kleban

Reputation: 71

is it possible to launch an extension from a website?

Had a qq: is it possible to launch an extension (that is already installed) when someone clicks on a link ?

For example, let's say on my website I have a button that says "click here to launch the extension". After they install my chrome extension, when a user clicks on this button, could the extension launch? (e.g.- the popup to open).

The goal is this: I have an extension that acts like a search bar. I also have search on the website, but I wanted it to search using the extension instead of the website if a user chooses to.

Thanks for any info, Y

Upvotes: 0

Views: 200

Answers (1)

gkalpak
gkalpak

Reputation: 48211

If you are asking for a way to programmatically open the extension's popup, then you will be disappointed (as it cannot be done).

If it serves your purpose, you could do something like this:

  1. Have your extension inject a content script into your webpage.

  2. Have the content script bind to a button's click event.

  3. When the button is clicked: Pass some parameters to the extension's background page, let the extension perform the search and send the results back to the webpage.

Upvotes: 2

Related Questions