diff --git a/godoc/static/godocs.js b/godoc/static/godocs.js index 1fb8b91e..3ce27ea6 100644 --- a/godoc/static/godocs.js +++ b/godoc/static/godocs.js @@ -263,7 +263,14 @@ function personalizeInstallInstructions() { var prefix = '?download='; var s = window.location.search; if (s.indexOf(prefix) != 0) { - // No 'download' query string; bail. + // No 'download' query string; detect "test" instructions from User Agent. + if (navigator.platform.indexOf('Win') != -1) { + $('.testUnix').hide(); + $('.testWindows').show(); + } else { + $('.testUnix').show(); + $('.testWindows').hide(); + } return; } diff --git a/godoc/static/static.go b/godoc/static/static.go index a47a7fd0..6fab8da3 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -833,7 +833,14 @@ function personalizeInstallInstructions() { var prefix = '?download='; var s = window.location.search; if (s.indexOf(prefix) != 0) { - // No 'download' query string; bail. + // No 'download' query string; detect "test" instructions from User Agent. + if (navigator.platform.indexOf('Win') != -1) { + $('.testUnix').hide(); + $('.testWindows').show(); + } else { + $('.testUnix').show(); + $('.testWindows').hide(); + } return; }