how to check if my extension is installed on the browser where a specific web-page is visited?

627 Views Asked by At

I have gone through Check is chrome extensions installed, https://stackoverflow.com/a/27930310 and also some other questions in stack-overflow. but i could only make it work for chrome but not all browsers at a time. Can anyone help me detect if my extension is installed when ever a website is visited. I have implemented solution as mentioned in second url posted above. but it worked only for chrome. I wanted to detect extension in any browser where i visit xyz url.

1

There are 1 best solutions below

0
dominik On

In firefox a webextension's content script can use the cloneInto API (https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.cloneInto) to insert code into a web page's script context where then e.g. a global variable can be written into the window object to identify the extension is installed.