aboutsummaryrefslogtreecommitdiff
path: root/pointless
diff options
context:
space:
mode:
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}