Commit 3116332f authored by sajolida's avatar sajolida
Browse files

Revert "Merge branch 'web/14922-download-metrics'"

This reverts commit 9932a887, reversing
changes made to a6942f92.
parent 8e581086
......@@ -170,19 +170,6 @@ document.addEventListener("DOMContentLoaded", function() {
}
}
function hitCounter(status) {
try {
var counter_url, url, scenario, version;
counter_url = "https://tails.boum.org/install/download/counter";
url = window.location.href.split("/");
scenario = url[url.lastIndexOf("install") + 1];
version = document.getElementById("tails-version").textContent.replace("\n", "");
fetch(counter_url + "?scenario=" + scenario + "&version=" + version + "&status=" + status);
} catch (e) {
console.log(e.toString());
}
}
function resetVerificationResult(result) {
hide(document.getElementById("verifying-download"));
hide(document.getElementById("verification-successful"));
......@@ -222,7 +209,6 @@ document.addEventListener("DOMContentLoaded", function() {
showVerifyDownload();
hide(document.getElementById("verify-download-wrapper"));
resetVerificationResult();
hitCounter(result);
if (result === "successful") {
show(document.getElementById("verification-successful"));
opaque(document.getElementById("step-continue-direct"));
......@@ -272,45 +258,26 @@ document.addEventListener("DOMContentLoaded", function() {
opaque(document.getElementById("continue-link-bittorrent"));
// Display "Verify with your browser" when ISO image is clicked
document.getElementById("download-iso").onclick = function(e) {
try {
e.preventDefault();
hitCounter("download-iso");
toggleDirectBitTorrent("direct");
resetVerificationResult();
} finally {
window.location = this.getAttribute("href");
}
document.getElementById("download-iso").onclick = function() {
toggleDirectBitTorrent("direct");
resetVerificationResult();
}
// Display "Verify with your browser" when "I already" is clicked
document.getElementById("already-downloaded").onclick = function() {
hitCounter("already-downloaded");
toggleDirectBitTorrent("direct");
resetVerificationResult();
}
// Reset verification when downloading again after failure
document.getElementById("download-iso-again").onclick = function(e) {
try {
e.preventDefault();
hitCounter("download-iso-again");
toggleDirectBitTorrent("direct");
resetVerificationResult();
} finally {
window.location = this.getAttribute("href");
}
document.getElementById("download-iso-again").onclick = function() {
toggleDirectBitTorrent("direct");
resetVerificationResult();
}
// Display "Verify with BitTorrent" when Torrent file is clicked
document.getElementById("download-torrent").onclick = function(e) {
try {
e.preventDefault();
hitCounter("download-torrent");
toggleDirectBitTorrent("bittorrent");
} finally {
window.location = this.getAttribute("href");
}
document.getElementById("download-torrent").onclick = function() {
toggleDirectBitTorrent("bittorrent");
}
// Install Chrome extension when clicking "chrome" links
......
<div id="activate-tails-verification"></div> <!-- Needed to activate the verification extension -->
<div id="extension-version">1.0</div> <!-- Minimum version of the extension -->
<div id="tails-version">[[!inline pages="inc/stable_amd64_version" raw="yes" sort="age"]]</div>
<h1 class="debian windows linux mac-usb mac-dvd dvd vm upgrade-tails">Download Tails [[!inline pages="inc/stable_amd64_version" raw="yes" sort="age"]]</h1>
......
......@@ -24,7 +24,6 @@ h1 {
#skip-download-direct,
#skip-download-bittorrent,
#extension-version,
#tails-version,
.use-mirror-pool-on-retry {
display: none;
}
......
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