简体   繁体   English

如何获取最新版本的 firefox 插件的链接?

[英]How to get the link to the latest version of firefox addon?

I don't want to redirect user to firefox's store to install addon.我不想将用户重定向到 firefox 的商店来安装插件。 I want to user be able to install addon immediately on my own site.我希望用户能够立即在我自己的网站上安装插件。 I know for this I should create 'a' element with href to.xpi file.我知道为此我应该使用 href to.xpi 文件创建“a”元素。 But how I can get the link to the latest version of.xpi file of the addon from the firefox store?但是我如何才能从 firefox 商店获得插件的最新版本.xpi 文件的链接?

I've got it. 我懂了。 The formula to get always the latest version of xpi file of addon: 总是得到最新版本的addon的xpi文件的公式:

addons.mozilla.org/firefox/downloads/latest/ADDON_NAME/addon-ADDON_ACCOUNT_ID-latest.xpi

According to the Firefox Policy Templates , it should be possible to simply use https://addons.mozilla.org/firefox/downloads/latest/SHORT_NAME/latest.xpi , where SHORT_NAME corresponds to the add-on name.根据Firefox Policy Templates ,应该可以简单地使用https://addons.mozilla.org/firefox/downloads/latest/SHORT_NAME/latest.xpi ,其中SHORT_NAME对应于加载项名称。 It does not seem to be necessary to extract the user ID (anymore?):似乎没有必要提取用户 ID(不再?):

Eg, https://addons.mozilla.org/firefox/downloads/latest/givero/latest.xpi for givero .例如, https://addons.mozilla.org/firefox/downloads/latest/givero/latest.xpigivero

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM