如何实现:在自己的网站上托管自动安装firefox Addon [英] How to achieve : Automatic installation of firefox Addon on hosted on own website
问题描述
我想实现这一目标:
- 在我自己的网站上托管插件
- 当用户单击我网站上的特定按钮时,插件应该像从Mozilla AMO一样自动安装
推荐答案
您应该确保您的网络服务器使用application/x-xpinstall
MIME类型提供XPI文件-然后您可以简单地链接到它,Firefox会提供安装它.要使它更加精美,您可以使用InstallTrigger
-您可以指定名称或加载项的图标.用户始终必须首先允许安装请求,然后才能看到安装窗口-仅针对白名单上的网站不会显示此请求,这意味着AMO几乎适用于所有用户.
You should make sure that your web server serves the XPI file with application/x-xpinstall
MIME type - then you can simply link to it and Firefox will offer to install it. To make this more fancy you can use InstallTrigger
- this lets you specify things like the name or the icon of the add-on. The user will always have to allow installation request first before he sees the installation window - this request isn't displayed only for web sites on the whitelist meaning AMO pretty much for all users.
这篇关于如何实现:在自己的网站上托管自动安装firefox Addon的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!