godoc/static: show relevant test instructions on install page
Fixes golang/go#12490
Change-Id: Ifb408f225a84b3c5daf739e1e0afc4f5540e4ebd
Reviewed-on: https://go-review.googlesource.com/18278
Reviewed-by: Russ Cox <rsc@golang.org>
diff --git a/godoc/static/godocs.js b/godoc/static/godocs.js
index 2ea3c7a..ec9f37a 100644
--- a/godoc/static/godocs.js
+++ b/godoc/static/godocs.js
@@ -273,6 +273,8 @@
}
if (os != 'windows') {
$('#windowsInstructions').hide();
+ $('.testUnix').show();
+ $('.testWindows').hide();
} else {
if (ext != 'msi') {
$('#windowsInstallerInstructions').hide();
@@ -280,6 +282,8 @@
if (ext != 'zip') {
$('#windowsZipInstructions').hide();
}
+ $('.testUnix').hide();
+ $('.testWindows').show();
}
var download = "https://storage.googleapis.com/golang/" + filename;
diff --git a/godoc/static/static.go b/godoc/static/static.go
index c234fa4..4457c71 100644
--- a/godoc/static/static.go
+++ b/godoc/static/static.go
@@ -842,6 +842,8 @@
}
if (os != 'windows') {
$('#windowsInstructions').hide();
+ $('.testUnix').show();
+ $('.testWindows').hide();
} else {
if (ext != 'msi') {
$('#windowsInstallerInstructions').hide();
@@ -849,6 +851,8 @@
if (ext != 'zip') {
$('#windowsZipInstructions').hide();
}
+ $('.testUnix').hide();
+ $('.testWindows').show();
}
var download = "https://storage.googleapis.com/golang/" + filename;