Commit d9add934 authored by lamby's avatar lamby Committed by sajolida
Browse files

Ensure that failing to record a "hit" does not cause other code to not execute. (re. #14922)

parent 785f55d7
......@@ -171,12 +171,16 @@ document.addEventListener("DOMContentLoaded", function() {
}
function hitCounter(status) {
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);
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) {
......
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