aboutsummaryrefslogtreecommitdiff
path: root/pointless
diff options
context:
space:
mode:
authorpacien2018-07-19 19:02:09 +0200
committerpacien2018-07-19 19:02:09 +0200
commit0a60570aaf54138b88a115eaa30bd1b6f8422097 (patch)
tree81b12a465dd90043fb957f18d1feb2c2eb0413f1 /pointless
parentfeed2b79f25899d4655b1391b2ff58f8147303af (diff)
downloadbeamer-viewer-0a60570aaf54138b88a115eaa30bd1b6f8422097.tar.gz
Add offline support
Diffstat (limited to 'pointless')
-rw-r--r--pointless/viewer/init.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/pointless/viewer/init.js b/pointless/viewer/init.js
index 9454a23..9ba881c 100644
--- a/pointless/viewer/init.js
+++ b/pointless/viewer/init.js
@@ -20,9 +20,16 @@ function isController() {
20 return window.opener == null || window.opener.location.href != window.location.href; 20 return window.opener == null || window.opener.location.href != window.location.href;
21} 21}
22 22
23function initCache() {
24 if (!navigator.serviceWorker) return;
25 navigator.serviceWorker.register("appcache.js");
26}
27
23function init() { 28function init() {
29 initCache();
30
24 var viewer = new Viewer(); 31 var viewer = new Viewer();
25 32
26 if ("file" in params) 33 if ("file" in params)
27 viewer.load(params["file"]); 34 viewer.load(params["file"]);
28} 35}