How to make a button to install our extension from AMO?

Hello,

Currently when our site users want to download our extension, they click on a button which is linked to a local XPI file on our site.

It works fine but now our extension is listed on AMO and we want our users directly download in AMO but without leaving our site.
So we want the same behavior than today (just click on a button) but with a download from AMO and not local.

I don’t find how to code this kind of button.
Do you have any idea on how to make this ?

Thanks a lot

1- You can use an iframe to load the addon page on AMO
2- You can create a button and insert the direct download link from the AMO ( <- Doesnt work … sorry :frowning: )

I prefer the second option (best ergonomy) but I just tried and it doesn’t work.
I have took the link under the button in AMO, you talked about this when you said “direct link” ?

Because if you copy/paste this link in the url bar, Firefox says it blocks the install.
I think it checks the links is called from AMO (I see a hash in the button, probably for this).

Or do you talk about another “direct link” ? Where ?

Thanks

Which addon is yours?

This is PriceSniper but you can’t find it on AMO because yesterday evening we received a reject for the full review (it was accepted on the preliminary review) and they remove it from AMO.

The plugin is still on our site (www.pricesniper.com) but it’s in french :wink:

But I have tested the operation you said (direct link) with another random plugin on AMO and it doesn’t work for me. So if you succeed in making it work with any extension, I am interested (it will be useful when our extension will be defintely accepted).

Pointing the button to the direct XPI on AMO won’t work because the host requesting the download isn’t AMO, so Firefox blocks it for security reasons. You can of course download the file and host it yourself, but that adds an installation warning due to the domain not being whitelisted (only AMO is whitelisted by default).

Thanks Jorge for this precise answer.
Considering that, what is your “official” advice for company like us that want their site users to download their extension ?

  • put a link on our site to AMO and let the user leave our site (to download directly from AMO) ?
  • host the file (and get the warning) ?
  • another way ?
    Thanks a lot

I think the most effective approach is to point users to AMO. What I’ve heard from other developers who self host is that the additional installation warning makes many users give up. That might depend on how much they think they need the add-on, so your results may vary.

Ok ! Thanks for your answers :slight_smile: