Skip to content

Commit 0193166

Browse files
committed
remove unused cache code
1 parent ef27a68 commit 0193166

File tree

2 files changed

+0
-66
lines changed

2 files changed

+0
-66
lines changed

index.html

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -223,20 +223,6 @@ <h4>Other</h4>
223223
<input type="checkbox" id="opt_layers_launches">
224224
</div>
225225
</div>
226-
<div class="row option">
227-
<span><b>Force check for new version</b></span>
228-
<div class="switch off" id="sw_cache">
229-
<span class="thumb"></span>
230-
<input type="checkbox" id="opt_cache">
231-
</div>
232-
</div>
233-
<div class="row info">
234-
<span>
235-
Reloads appcache if necessary.
236-
The size of cache files is 1.2 MB.
237-
This does not include map tiles.
238-
</span>
239-
</div>
240226
</div>
241227
</div>
242228
<div id="weatherbox" style="display: none" class="flatpage">

js/app.js

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -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
206185
function 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
225204
var 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-
242206
var listScroll;
243207
var GPS_ts = null;
244208
var 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

Comments
 (0)