@@ -181,27 +181,6 @@ for(var idx in params) {
181181 }
182182}
183183
184- $ . ajaxSetup ( { cache : true } ) ;
185-
186- var force_check_cache = false ;
187-
188- // handle cachin events and display a loading bar
189- var loadComplete = function ( e ) {
190- clearTimeout ( initTimer ) ;
191-
192- if ( e . type == 'updateready' ) {
193- // swapCache may throw exception if the isn't a previous cache
194- try {
195- window . applicationCache . swapCache ( ) ;
196- } catch ( v ) { }
197-
198- window . location . reload ( ) ;
199- return ;
200- }
201-
202- $ ( '#loading .complete' ) . stop ( true , true ) . animate ( { width : 200 } , { complete : trackerInit } ) ;
203- } ;
204-
205184// loads the tracker interface
206185function trackerInit ( ) {
207186 $ ( '#loading,#settingsbox,#aboutbox,#chasebox' ) . hide ( ) ; // welcome screen
@@ -224,21 +203,6 @@ function trackerInit() {
224203// if for some reason, applicationCache is not working, load the app after a 3s timeout
225204var initTimer = setTimeout ( trackerInit , 3000 ) ;
226205
227- var cache = window . applicationCache ;
228- // TEMPORARILY DISABLED - MJ 2020-08-29
229- // Application Cache is broken in recent chrome versions/
230- // Disabling these addEventListener calls at least makes the rest of the page load.
231- // Unsure what the implications of disabling these are.
232-
233- //cache.addEventListener('noupdate', loadComplete, false);
234- //cache.addEventListener('updateready', loadComplete, false);
235- //cache.addEventListener('cached', loadComplete, false);
236- //cache.addEventListener('error', loadComplete, false);
237-
238- // if the browser supports progress events, display a loading bar
239- //cache.addEventListener('checking', function() { if(map && !force_check_cache) return; force_check_cache = false; clearTimeout(initTimer); $('#loading .bar,#loading').show(); $('#loading .complete').css({width: 0}); }, false);
240- //cache.addEventListener('progress', function(e) { $('#loading .complete').stop(true,true).animate({width: (200/e.total)*e.loaded}); }, false);
241-
242206var listScroll ;
243207var GPS_ts = null ;
244208var GPS_lat = null ;
@@ -875,22 +839,6 @@ $(window).ready(function() {
875839 if ( offline . get ( opt_name ) ) $ ( switch_id ) . removeClass ( 'off' ) . addClass ( 'on' ) ;
876840 }
877841
878- // force re-cache
879- $ ( '#sw_cache' ) . click ( function ( ) {
880- var e = $ ( this ) . removeClass ( 'off' ) . addClass ( 'on' ) ;
881- if ( confirm ( "The app will automatically reload, if new version is available." ) ) {
882- force_check_cache = true ;
883-
884- try {
885- applicationCache . update ( ) ;
886- } catch ( v ) {
887- force_check_cache = false ;
888- alert ( "There is no applicationCache available" ) ;
889- }
890- }
891- e . removeClass ( 'on' ) . addClass ( 'off' ) ;
892- } ) ;
893-
894842 // We are able to get GPS position on idevices, if the user allows
895843 // The position is displayed in top right corner of the screen
896844 // This should be very handly for in the field tracking
0 commit comments