I am trying to find an easy way to determine if my extension is installed in Firefox 3.6. This should be done from a web page, possibly using javascript.
I read a lot of blogs that say I should try downloading an image from my extension. Since I have an extension, and I can write code that seems like an unnecessary hack.
I also thought about setting a global variable in a web document, but I couldnβt. I thought I could write:
top.window.content.document.hasMyPlugin = true
but this does not seem to work (hasMyPlugin is undefined). I only add this variable when visiting my domain (I added the WebProgressListener and check the host property), so global namespace pollution should not be a problem.
Any ideas?
UPDATE
The way I'm trying to access a variable is simple if(hasMyPlugin)or if(document.hasMyPlugin)... Perhaps I am accessing it incorrectly?
source
share