在Chrome中检测插件的版本号

时间:2011-09-14 20:50:27

标签: javascript google-chrome plugins citrix

在Firefox中我可以参考

navigator.plugins["myplugin"].version

但Chrome中不存在属性'version'。我正在使用的特定插件是Citrix客户端接收器插件(download here)。

任何人都知道我不知道在哪里或如何使用JavaScript在Chrome中获取此插件的版本号?

1 个答案:

答案 0 :(得分:0)

获取Chrome浏览器版本号的唯一方法是解释name

//Example, Shockwave Flash
var version = navigator.plugins["Shockwave Flash"].name.match(/([\d.]+)/);
 //used semicolons (grouping) inside the Regular expression, to allow the
 // possibility of defining a more detailed/exact version position.

version = version ? version[1] : "";