How to define a custom plugin in Firefox / IE / Chrome?

My team wants to create a "plugin" for firefox / chrome / IE. How to use javascript to determine if this plugin is installed (not an extension)?

I would like to have a javascript snippet that can determine if any plugin is installed. Returns true if set, returns false otherwise.

For example ... how do I get a list of plugins and then scroll to see if one of them matches my plugin name? If a match, return 1.

+4
source share
3 answers
solved: document.writeln("<TABLE BORDER=1><TR VALIGN=TOP>", "<TH ALIGN=left>i", "<TH ALIGN=left>name", "<TH ALIGN=left>filename", "<TH ALIGN=left>description", "<TH ALIGN=left># of types</TR>") for (i=0; i < navigator.plugins.length; i++) { document.writeln("<TR VALIGN=TOP><TD>",i, "<TD>",navigator.plugins[i].name, "<TD>",navigator.plugins[i].filename, "<TD>",navigator.plugins[i].description, "<TD>",navigator.plugins[i].length, "</TR>") } document.writeln("</TABLE>") 
-7
source

navigator.plugins will have an array of plugins that you can check.

This exists for Firefox, Chrome and IE (at least version 8, I don't have a lower version for testing)

This is what the array looks like in webkit:

Plugins Array in Webkit

+13
source

You can get browser plugins with this javascript code:

 <script type="text/javascript"> var x=navigator.plugins.length; // store the total no of plugin stored var txt="Total plugin installed: "+x+"<br/>"; txt+="Available plugins are->"+"<br/>"; for(var i=0;i<x;i++) { txt+=navigator.plugins[i].name + "<br/>"; } document.getElementById("example").innerHTML=txt; </script> <br/> <script> 
+1
source

All Articles