Commit 4300e663 authored by sajolida's avatar sajolida

Display a deprecation notice when the extension is installed

In theory, it should also be possible to publish an update that
uninstalls itself:

https://extensionworkshop.com/documentation/manage/retiring-your-extension/

But I couldn't get it to work. Not publishing any update will also save
us time.
parent e1621fa2
document.addEventListener("DOMContentLoaded", function() {
/* Deprecation of the extension */
window.addEventListener("message", receiveMessage);
function receiveMessage(event) {
if (event.source !== window || event.origin !== "https://tails.boum.org" || !event.data) {
return;
}
if (event.data.action === "extension-installed") {
show(document.getElementById("extension"));
}
}
//specify url of json file containing valid checksums for ISO and USB images below:
//var URLofJsonFileContainingChecksums='https://tails.boum.org/install/v2/Tails/amd64/stable/latest.json'; //this URL will only work if download.html is served from served from https://tails.boum.org/ because of same origin because of same-origin policy.
var URLofJsonFileContainingChecksums='https://cors-anywhere.herokuapp.com/https://tails.boum.org/install/v2/Tails/amd64/stable/latest.json'; //use this URL to get around same-origin policy (SOP) if you are staging this locally. The https://cors-anywhere.herokuapp.com/ proxy includes the necessary CORS headers to relax SOP.
......
<!-- Deprecation of the extension -->
<div id="activate-tails-verification"></div>
<div id="extension-version">2.4</div>
<div id="tails-version">[[!inline pages="inc/stable_amd64_version" raw="yes" sort="age"]]</div>
<h1 class="usb upgrade dvd vm">Download Tails [[!inline pages="inc/stable_amd64_version" raw="yes" sort="age"]]</h1>
......@@ -62,6 +66,12 @@ were solved, and known issues that have already been identified.</p>
<p>Your BitTorrent client will automatically verify your download when it completes.</p>
<p>The verification below is optional for a BitTorrent download.</p>
</div>
<div id="extension" class="indent block tip">
<p><strong>You have our <em>Tails Verification</em> extension installed.</strong></p>
<p>Since December 2020, you can do the verification directly on the page.
You don't need the <em>Tails Verification</em> anymore and can safely remove it.</p>
<p>See our [[statement about the deprecation of the <em>Tails Verification</em> extension|news/verification_extension_deprecation]].</p>
</div>
<div id="verification" class="indent block">
<div id="no-js">
<p>You seem to have JavaScript disabled. To verify your download,
......
/* Deprecation of the extension */
#extension,
#extension-version {
display: none;
}
/* Display no JS version by default */
#no-js {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment