File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 9292 window . addEventListener ( 'click' , function ( ) {
9393 showClose ( ) ;
9494 } ) ;
95+
96+ // This fixes the issue of a "stale" CGM value displaying indefinately.
97+ // It displays "Internet offline." until internet is restored.
98+ function uOffline ( ) {
99+ document . body . innerHTML =
100+ 'Internet offline.'
101+ }
102+ // Return to normal as soon as internet connectivity is restored.
103+ function uOnline ( ) {
104+ location . reload ( )
105+ }
106+ if ( window . addEventListener ) {
107+ window . addEventListener ( 'offline' , uOffline ) ;
108+ window . addEventListener ( 'online' , uOnline ) ;
109+ } else {
110+ document . body . attachEvent ( 'onoffline' , uOffline ) ;
111+ document . body . attachEvent ( 'ononline' , uOnline ) ;
112+ }
113+
95114 < % } % >
96115 </ script >
97116 < %if (face == 'config') { %>
You can’t perform that action at this time.
0 commit comments