Skip to content

Commit 423c921

Browse files
seankhliaogopherbot
authored andcommitted
_content/doc: always update install tab version numbers
Fixes golang/go#69603 Change-Id: I5dd8910dd7a6f9c758a8f755eeb544d2d95446dc Reviewed-on: https://go-review.googlesource.com/c/website/+/620556 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Matloob <[email protected]>
1 parent 2da4c89 commit 423c921

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_content/doc/download.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ class DownloadsController {
2424
this.linuxFileName = file;
2525
}
2626
}
27+
28+
this.setVersion(data[0].version);
29+
this.tabs.forEach(el => this.setInstallTabData(el.id));
30+
2731
this.detectOS();
2832
const osTab = document.getElementById(this.osName);
2933
if (osTab !== null) {
3034
osTab.click();
3135
}
32-
this.setVersion(data[0].version);
3336
})
3437
.catch(console.error);
3538
this.setEventListeners();
@@ -70,8 +73,6 @@ class DownloadsController {
7073
this.osName = 'linux';
7174
} else if (navigator.userAgent.indexOf('Mac') !== -1) {
7275
this.osName = 'mac';
73-
} else if (navigator.userAgent.indexOf('X11') !== -1) {
74-
this.osName = 'unix';
7576
} else if (navigator.userAgent.indexOf('Win') !== -1) {
7677
this.osName = 'windows';
7778
}
@@ -93,7 +94,6 @@ class DownloadsController {
9394
handleTabClick(e) {
9495
const el = (e.target);
9596
this.activateTab(Array.prototype.indexOf.call(this.tabs, el));
96-
this.setInstallTabData(el.id);
9797
}
9898

9999
// get version number.

0 commit comments

Comments
 (0)