Accessing the list of Chrome plugins from a web page via Javascript

I created a webpage and would like to execute some code only if the latest version of the plugin is installed. In Firefox one can see the version of the plugin via navigator.plugins, in Chrome this is not possible and unfortunately the version is not fully specified in the name / description. Any ideas on how else I can get this?

I wanted to use the chrome: plugins page way that is directly related to PluginsDOMHandler, but it seems to be very complicated: apparently you have to deal with C ++ objects, but I don't know exactly how .. Maybe something like js-ctypes (used with Mozilla)?

I've read all the existing questions about Chrome plugins but couldn't find a solution. Thanks in advance for your help!

+3


source to share


1 answer


The problem is navigator.plugins is not part of any spec. It is the free will of the vendors to add it to the browser. Chrome doesn't have a "version" key in the Plugin object, so cu can try your best guess from the plugin name (eg "Shockwave Flash 16.0 r0").

Also, take a look at the note from the Mozilla developers . Plugin arrays may not be available to you as a privacy measure. You can request a specific plugin, but you won't see them all.



In any case, you can only use the plugin name in chrome and try the guest plugins version from it.

+1


source







All Articles