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>
406
406
svgStyle : null
407
407
} ) ;
408
408
409
+
409
410
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
- }
414
411
pageTimeoutTimer += 5 ;
415
412
setTimeout ( function ( ) { PageTimeoutCounter ( ) ; } , 5000 ) ;
416
413
} ;
@@ -635,7 +632,14 @@ <h3>Muon Veto</h3>
635
632
}
636
633
637
634
$ ( 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
+ } ) ;
639
643
document . autoplay = false ;
640
644
// Save some info from template tags
641
645
document . user = "{{ request.user.username }}" ;
You can’t perform that action at this time.
0 commit comments