开发者

Detect plugin's version number in Chrome

In Firefox I can refere开发者_高级运维nce

navigator.plugins["myplugin"].version

but the property 'version' doesn't exist in chrome. The particular plugin I'm working with is the Citrix Client Receiver plugin (download here).

Anyone know anything I don't about where or how else I might be able to get the version number of this plugin in Chrome using JavaScript?


The only way to obtain the version number of a plugin in Chrome is to interpret the 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] : "";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜