File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -132,14 +132,21 @@ function selectLatestPlatform(thisPlatform) {
132
132
var platformButtons = document . getElementById ( "latest-selector" ) . getElementsByTagName ( "TD" ) ;
133
133
var platformInfoBoxes = document . getElementById ( "latest-info" ) . getElementsByTagName ( "TD" ) ;
134
134
135
+ var thisPlatformSelector = document . getElementById ( "latest-selector-" + thisPlatform ) ;
136
+ var thisPlatformInfo = document . getElementById ( "latest-info-" + thisPlatform ) ;
137
+
138
+ var alreadySelected = false ;
139
+ if ( thisPlatformSelector . classList . contains ( "latest-highlight" ) ) {
140
+ alreadySelected = true ;
141
+ }
142
+
135
143
for ( i = 0 ; i < platformButtons . length ; i ++ ) {
136
144
platformButtons [ i ] . classList . remove ( "latest-highlight" ) ;
137
145
platformInfoBoxes [ i ] . classList . add ( "hide" ) ;
138
146
}
139
147
140
- var thisPlatformSelector = document . getElementById ( "latest-selector-" + thisPlatform ) ;
141
- var thisPlatformInfo = document . getElementById ( "latest-info-" + thisPlatform ) ;
142
-
143
- thisPlatformSelector . classList . add ( "latest-highlight" ) ;
144
- thisPlatformInfo . classList . remove ( "hide" ) ;
148
+ if ( alreadySelected === false ) {
149
+ thisPlatformSelector . classList . add ( "latest-highlight" ) ;
150
+ thisPlatformInfo . classList . remove ( "hide" ) ;
151
+ }
145
152
}
You can’t perform that action at this time.
0 commit comments