Commit 0afd5bf5 authored by Hiro's avatar Hiro 🏄
Browse files

Update to script in line

parent 9392491c
$(".downloadLink").click(
function(e) {
e.preventDefault();
locale = window.location.href.split('/')[3];
//open download link in new page
window.open( $(this).attr("href") );
url = "/thank-you/"
//redirect current page to success page
if (locale != "download") {
url = "/" + locale + url
}
window.location=url;
window.focus();
}
);
......@@ -89,5 +89,5 @@
<script src="{{ '/static/js/scrollspy.min.js'|asseturl }}" ></script>
<script src="{{ '/static/js/modernizr.js'|asseturl }}" ></script>
<script src="{{ '/static/js/fallback.js'|asseturl }}" ></script>
{% include 'script-download.html' %}
<script src="{{ '/static/js/download.js'|asseturl }}" ></script>
</div>
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" {% if bag('alternatives', this.alt, 'direction') == 'text-right' %}dir="rtl"{% endif %}>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="base-uri 'self'">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ _('Defend yourself against tracking and surveillance. Circumvent censorship.') }}">
<meta name="twitter:card" content="summary" />
......
<script>
$(".downloadLink").click(
function(e) {
e.preventDefault();
//open download link in new page
window.open( $(this).attr("href") );
//redirect current page to success page
window.location="{{ '/thank-you'|url(alt=this.alt) }}";
window.focus();
}
);
</script>
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