From 32122b8213d8e90ff47769a532b9a5651566f0e0 Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Sat, 29 Aug 2020 14:11:41 -0500 Subject: [PATCH] Work around deprecation of offline capabilities --- globals.js | 22 ++-- index.html | 361 +++++++++++++++++++++++++++-------------------------- 2 files changed, 195 insertions(+), 188 deletions(-) diff --git a/globals.js b/globals.js index 2e23398..5f6138a 100644 --- a/globals.js +++ b/globals.js @@ -59,16 +59,20 @@ function initSession(){ // Check if a new cache is available on page load. || TODO: the Server could notify for new versions, then the check would be done closer to time. window.addEventListener('load', function(e) { - window.applicationCache.addEventListener('updateready', function(e) { - if (window.applicationCache.status == window.applicationCache.UPDATEREADY) { - // Intentially not calling swapcache here, it's quite useless because it will only use the new verstion for newly loaded files anyway... - if (confirm('A new version of this site is available. Load it?')) { - window.location.reload(); + try{ + window.applicationCache.addEventListener('updateready', function(e) { + if (window.applicationCache.status == window.applicationCache.UPDATEREADY) { + // Intentially not calling swapcache here, it's quite useless because it will only use the new verstion for newly loaded files anyway... + if (confirm('A new version of this site is available. Load it?')) { + window.location.reload(); + } + } else { + // Manifest didn't changed. Nothing new to server. } - } else { - // Manifest didn't changed. Nothing new to server. - } - }, false); + }, false); + } catch (ex) { + console.log("Quick Fix - switch off AppCachea",ex); + } }, false); var indexHtmlRevision = $("#lbRevision").text().split(" ")[1]; diff --git a/index.html b/index.html index a4e2046..75368f2 100644 --- a/index.html +++ b/index.html @@ -1,179 +1,182 @@ - - - - - - - Shopping List - - - - - - - - - - - - - - - - - -
- TESTL -

TESTMID

- TESTR - -
-
- - -
- - - - - - - - - - - - - - - -
- $Revision: 74 $ - - + + + + + + + Shopping List + + + + + + + + + + + + + + + + + +
+ TESTL +

TESTMID

+ TESTR + +
+
+ + +
+ + + + + + + + + + + + + + + +
+ $Revision: 74 $ + +