Reputation: 6093
I created a greasemonkey script and want to offer an "Install Greasemonkey" button on my homepage. This button should install the firefox greasemonkey addon and spare users from the redirection over addons.mozilla.org. After they installed greasemonkey, I offer an "Install greasemonkey script" button which already works.
Is it possible to include an "install greasemonkey" button directly on my homepage? Ideally it would use the plugin hosted on addons.mozilla.org and I wouldn't host greasemonkey on my own.
Upvotes: 2
Views: 893
Reputation: 987
You are on the right path here. Even if your users trust you, the best way is to have the actual xpi
hosted at Mozilla. Mozilla blocks installing add-ons from third-party sites by default (and for good reason).
Here is a screenshot of Aurora whining that I am trying to install from an unknown site:
If a simple link to Mozilla Addons is not good enough, you can try to link directly to the xpi as in the screenshot above. Here is my attempt at creating a link that would get the add on directly from Mozilla Addons. The HTML is pretty much from Mozilla itself. It does not look nice but you can fix that in CSS
, I hope.
<p class="install-button">
<a class="active" data-hash="sha256:61ea619b9922c826cdf0449ddf7d79d4d9bc9e6cae0083d21678870ea65454ef" href="https://addons.mozilla.org/en-US/firefox/downloads/latest/748/addon-748-latest.xpi?src=dp-btn-primary">
<span>Add to Firefox</span>
</a>
</p>
Upvotes: 8