File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,7 @@ function clean_refresh(text, force) {
368368
369369 lhash_update ( ) ;
370370 refresh ( ) ;
371+ refreshPredictions ( ) ;
371372
372373 return true ;
373374}
@@ -2286,10 +2287,13 @@ function refreshReceivers() {
22862287 } ) ;
22872288}
22882289
2290+ var ajax_predictions = null ;
2291+
22892292function refreshPredictions ( ) {
22902293 //if(typeof _gaq == 'object') _gaq.push(['_trackEvent', 'ajax', 'refresh', 'Predictions']);
2294+ clearTimeout ( periodical_predictions ) ;
22912295
2292- $ . ajax ( {
2296+ ajax_predictions = $ . ajax ( {
22932297 type : "GET" ,
22942298 url : predictions_url ,
22952299 data : "" ,
@@ -2301,6 +2305,7 @@ function refreshPredictions() {
23012305 error : function ( ) {
23022306 } ,
23032307 complete : function ( request , textStatus ) {
2308+ clearTimeout ( periodical_predictions ) ;
23042309 periodical_predictions = setTimeout ( refreshPredictions , 60 * 1000 ) ;
23052310 }
23062311 } ) ;
@@ -2471,6 +2476,9 @@ function stopAjax() {
24712476 // stop our timed ajax
24722477 clearTimeout ( periodical ) ;
24732478 if ( ajax_positions ) ajax_positions . abort ( ) ;
2479+
2480+ clearTimeout ( periodical_predictions ) ;
2481+ if ( ajax_predictions ) ajax_predictions . abort ( ) ;
24742482}
24752483
24762484var currentPosition = null ;
You can’t perform that action at this time.
0 commit comments