简体   繁体   中英

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. 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. But how I can get the link to the latest version of.xpi file of the addon from the firefox store?

I've got it. The formula to get always the latest version of xpi file of addon:

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. It does not seem to be necessary to extract the user ID (anymore?):

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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