File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
control/templates/control Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -406,11 +406,8 @@ <h3>Muon Veto</h3>
406406 svgStyle : null
407407} ) ;
408408
409+
409410 function PageTimeoutCounter ( ) {
410- if ( pageTimeoutTimer > 60 ) {
411- alert ( "Page has not updated for 60 seconds. You probably have a stale tab. Please refresh your browser." ) ;
412- return ;
413- }
414411 pageTimeoutTimer += 5 ;
415412 setTimeout ( function ( ) { PageTimeoutCounter ( ) ; } , 5000 ) ;
416413 } ;
@@ -635,7 +632,14 @@ <h3>Muon Veto</h3>
635632 }
636633
637634 $ ( function ( ) { //DOM Ready
638- PageTimeoutCounter ( ) ;
635+ PageTimeoutCounter ( ) ;
636+ document . alertshown = false ;
637+ $ ( document ) . mousemove ( function ( ) {
638+ if ( pageTimeoutTimer > 60 && ! document . alertshown ) {
639+ alert ( "Stale page detected. Please update your browser window to proceed." ) ;
640+ document . alertshown = true ;
641+ }
642+ } ) ;
639643 document . autoplay = false ;
640644 // Save some info from template tags
641645 document . user = "{{ request.user.username }}" ;
You can’t perform that action at this time.
0 commit comments