Created
April 4, 2022 20:31
-
-
Save rpl/0f8f5a6fb88a1c0a214738ad0bcf81bd to your computer and use it in GitHub Desktop.
Self-distribuited addon install test page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Self-distribuited addon install</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<h1>Self-distribuited addon install</h1> | |
<h2>Supported install flow examples</h2> | |
<h3>1) Link to xpi url (no JS)</h3> | |
<div id="example-option-1" class="install-ok"> | |
<a href="https://addons.mozilla.org/firefox/downloads/file/3923300/facebook_container-2.3.2-fx.xpi"> | |
Install add-on by clicking here | |
</a> | |
</div> | |
<h3>2) Navigate to xpi url from JS code (executed from inside a callback that is handling user input)</h3> | |
<div id="example-option-2" class="install-ok"> | |
<button> | |
Install add-on by clicking here | |
</button> | |
<script> | |
document.querySelector("#example-option-2 > button").onclick = () => { | |
window.location = "https://addons.mozilla.org/firefox/downloads/file/3923300/facebook_container-2.3.2-fx.xpi"; | |
}; | |
</script> | |
</div> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment