Commit 63323a6c authored by sajolida's avatar sajolida
Browse files

Merge remote-tracking branch 'origin/feature/15292-usb-image' into feature/15292-usb-image

parents d07318f9 02ee4e9b
......@@ -271,19 +271,19 @@ document.addEventListener("DOMContentLoaded", function() {
opaque(document.getElementById("continue-link-bittorrent"));
// Display "Verify with your browser" when image is clicked
document.getElementById("download-img").onclick = function(e) { displayVerificationExtension(e); }
document.getElementById("download-iso").onclick = function(e) { displayVerificationExtension(e); }
document.getElementById("download-img").onclick = function(e) { displayVerificationExtension(e, this); }
document.getElementById("download-iso").onclick = function(e) { displayVerificationExtension(e, this); }
function displayVerificationExtension(e) {
function displayVerificationExtension(e, elm) {
try {
e.preventDefault();
hitCounter("download-iso");
hitCounter("download-image");
toggleDirectBitTorrent("direct");
resetVerificationResult();
} finally {
// Setting window.location.href will abort AJAX requests resulting
// in a NetworkError depending on the timing and browser.
window.open(this.getAttribute("href"), "_blank");
window.open(elm.getAttribute("href"), "_blank");
}
}
......@@ -295,17 +295,19 @@ document.addEventListener("DOMContentLoaded", function() {
}
// Reset verification when downloading again after failure
document.getElementById("download-img-again").onclick = function(e) { resetVerification(e); }
document.getElementById("download-iso-again").onclick = function(e) { resetVerification(e); }
document.getElementById("download-img-again").onclick = function(e) { resetVerification(e, this); }
document.getElementById("download-iso-again").onclick = function(e) { resetVerification(e, this); }
function resetVerification(e) {
function resetVerification(e, elm) {
try {
e.preventDefault();
hitCounter("download-iso-again");
hitCounter("download-image-again");
toggleDirectBitTorrent("direct");
resetVerificationResult();
} finally {
window.location = this.getAttribute("href");
// Setting window.location.href will abort AJAX requests resulting
// in a NetworkError depending on the timing and browser.
window.open(elm.getAttribute("href"), "_blank");
}
}
......
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