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.
Asked
Active
Viewed 462 times
0

Pavan Prabhu
- 37
- 7
-
1"Check chrome extension" in IE and Firefox sounds a bit like a waste of time – mplungjan Aug 22 '18 at 08:33
-
hm, your extension could add a hidden div to your page. On your Javascriptside you can check if the div is there. – MThiele Aug 22 '18 at 08:38
-
@MThiele Thanks for helping. I have tried that with an
attribute instead of div. But in javascript i had to access that file using path which is a problem here as chrome extensions have different path than firefox ones. – Pavan Prabhu Aug 22 '18 at 08:47
1 Answers
0
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.

dominik
- 151
- 1
- 2
- 13