开发者

Detect plugin's version number in Chrome

开发者 https://www.devze.com 2023-04-05 03:06 出处:网络
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

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

精彩评论

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