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?
问问题
293 次
1 回答
1
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
- Where ADDON_NAME - name of addon in store. You can get it from the url of the page of addon in FF. For example for this addon https://addons.mozilla.org/en-US/firefox/addon/givero/ the ADDON_NAME is givero.
Where ADDON_ACCOUNT_ID is id of owner account of addon. You can get it from link under the title of addon.
So for example for this addon https://addons.mozilla.org/en-US/firefox/addon/givero/ the link to the latest version of .xpi file will looks: https://addons.mozilla.org/firefox/downloads/latest/givero/addon-14479531-latest.xpi
于 2019-04-09T12:52:09.520 回答