Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
tails
Commits
63323a6c
Commit
63323a6c
authored
Jan 15, 2019
by
sajolida
Browse files
Merge remote-tracking branch 'origin/feature/15292-usb-image' into feature/15292-usb-image
parents
d07318f9
02ee4e9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
wiki/src/install/inc/js/download.js
View file @
63323a6c
...
...
@@ -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-i
so
"
);
hitCounter
(
"
download-i
mage
"
);
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-i
so
-again
"
);
hitCounter
(
"
download-i
mage
-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
"
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment