_content: remove dead code on download page
Inline JS is not allowed by our CSP. This code does not
execute and is reported as an error in the inspector console.
Change-Id: Ic56e86b6e12ed2b4fcdd20c07026cf29ae4c7c40
Reviewed-on: https://go-review.googlesource.com/c/website/+/480956
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/_content/dl.tmpl b/_content/dl.tmpl
index 4cc17e9..37776a7 100644
--- a/_content/dl.tmpl
+++ b/_content/dl.tmpl
@@ -62,39 +62,6 @@
</div>
</div>
{{end}}
-
-<script>
-$(document).ready(function() {
- $('a.download').click(function(e) {
- // Try using the link text as the file name,
- // unless there's a child element of class 'filename'.
- var filename = $(this).text();
- var child = $(this).find('.filename');
- if (child.length > 0) {
- filename = child.text();
- }
-
- // This must be kept in sync with the filenameRE in godocs.js.
- var filenameRE = /^go1\.\d+(\.\d+)?([a-z0-9]+)?\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\.[68])?\.([a-z.]+)$/;
- var m = filenameRE.exec(filename);
- if (!m) {
- // Don't redirect to the download page if it won't recognize this file.
- // (Should not happen.)
- return;
- }
-
- var dest = "/doc/install";
- if (filename.indexOf(".src.") != -1) {
- dest += "/source";
- }
- dest += "?download=" + filename;
-
- e.preventDefault();
- e.stopPropagation();
- window.location = dest;
- });
-});
-</script>
{{end}}
</article>