How to detect if add-on is installed

39 views
Skip to first unread message

Rogelio Flores

unread,
Feb 4, 2015, 3:19:01 PM2/4/15
to mozilla-la...@googlegroups.com
I searched this group and elsewhere but couldn't find an answer.

What's the best way for a page, using javascript, to detect whether a particualr add-on is currently installed (and presumably running)?

I can make an ajax HEAD request on the Chrome browser to this url: "chrome-extension://{my-extension-id}/manifest.json" and if successful, I know that my extension is installed. I haven't found a way to do something similar on Firefox.

Rudy Bruns

unread,
Feb 5, 2015, 2:42:47 AM2/5/15
to mozilla-la...@googlegroups.com

Might not be the best way, but I have a website which works together with a Firefox Extension and a Chrome Extension. I let both of these extensions run a content script on this website and use the ‘postmessage’ to send a message to this website, telling it the extension is installed and running. Of course you can also let this message contain the version number and type of extension (Chrome or Firefox).

--
You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozilla-labs-jet...@googlegroups.com.
To post to this group, send email to mozilla-la...@googlegroups.com.
Visit this group at http://groups.google.com/group/mozilla-labs-jetpack.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages