File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -178,17 +178,25 @@ function updateVariables() {
178178 * Updates labels on the homepage
179179 */
180180function updateText ( ) {
181- document . getElementById ( "schedule" ) . innerHTML = "You are viewing the <strong>" + getCurrentScheduleName ( ) + "</strong> schedule"
182- document . getElementById ( "selectedSchoolDisplay" ) . innerHTML = "from <strong>" + schools [ selectedSchoolIndex ] . fullName + "</strong>." ;
183181
184- document . getElementById ( "viewScheduleLink" ) . style . display = "block" ;
182+ if ( getCurrentTimeState ( ) !== DAY_OFF_FLAG ) {
183+ document . getElementById ( "schedule" ) . innerHTML = "You are viewing the <strong>" + getCurrentScheduleName ( ) + "</strong> schedule"
184+ document . getElementById ( "selectedSchoolDisplay" ) . innerHTML = "from <strong>" + schools [ selectedSchoolIndex ] . fullName + "</strong>." ;
185185
186+ document . getElementById ( "viewScheduleLink" ) . style . display = "block" ;
187+ }
186188
187189
188190 switch ( getCurrentTimeState ( ) ) {
189191 case DAY_OFF_FLAG :
190192 document . getElementById ( "schedule" ) . innerHTML = "There's <strong>no class</strong> today!"
191193 document . getElementById ( "viewScheduleLink" ) . style . display = "none" ;
194+
195+ let labels = document . getElementsByClassName ( "label" )
196+ for ( let i = 0 ; i < labels . length ; i ++ ) {
197+ labels [ i ] . style . display = "none" ;
198+ }
199+
192200
193201 break ;
194202
You can’t perform that action at this time.
0 commit comments