Skip to content

Instantly share code, notes, and snippets.

@matagus
Created November 14, 2015 04:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matagus/003672ba7bf062819a36 to your computer and use it in GitHub Desktop.
Save matagus/003672ba7bf062819a36 to your computer and use it in GitHub Desktop.
Firefox Add-on installation page
<script type="application/javascript">
<!--
function install (aEvent)
{
for (var a = aEvent.target; a.href === undefined;) a = a.parentNode;
var params = {
"Foo": { URL: aEvent.target.href,
IconURL: aEvent.target.getAttribute("iconURL"),
Hash: aEvent.target.getAttribute("hash"),
toString: function () { return this.URL; }
}
};
InstallTrigger.install(params);
return false;
}
-->
</script>
<a
href="https://addons.mozilla.org/firefox/downloads/file/368252/google_redirects_fixer_tracking_remover-2.0.0-fx.xpi"
iconURL="http://localhost/icon.png"
hash="sha1:35a56e7421cb8712f6c48a2240e89192e73bd742"
onclick="return install(event);">Install Extension!</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment