在Chrome中检测插件的版本号

Detect plugin's version number in Chrome

本文关键字:版本号 插件 检测 Chrome      更新时间:2023-09-26

在Firefox中我可以引用

navigator.plugins["myplugin"].version

但是属性'version'在chrome中不存在。我正在使用的特定插件是Citrix Client Receiver插件(在这里下载)。

有人知道任何我不知道在哪里或如何我可能能够得到这个插件的版本号在Chrome使用JavaScript?

获取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] : "";