aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.html
diff options
context:
space:
mode:
authorneauoire <[email protected]>2019-11-18 16:26:47 -0500
committerneauoire <[email protected]>2019-11-18 16:26:47 -0500
commit050092c332f2676b01e696cd413821af38709f70 (patch)
tree01a6148d64bb121ca6f956507cd925cb6a215921 /index.html
parent7b10b04b3e8b665afebd954d4a9b0c19f50cc1e7 (diff)
downloadOrca-050092c332f2676b01e696cd413821af38709f70.tar.gz
Orca-050092c332f2676b01e696cd413821af38709f70.zip
Added check against protocole for PWA
Diffstat (limited to 'index.html')
-rw-r--r--index.html8
1 files changed, 3 insertions, 5 deletions
diff --git a/index.html b/index.html
index d8fa5e3..fe420e5 100644
--- a/index.html
+++ b/index.html
@@ -42,11 +42,9 @@
client.start()
})
- if ('serviceWorker' in navigator) {
- try {
- navigator.serviceWorker.register('sw.js');
- } catch ( error ) {
- }
+ // Register PWA Service Worker
+ if (location.protocol.substr(0,4) !== ('file') && 'serviceWorker' in navigator) {
+ try { navigator.serviceWorker.register('sw.js') } catch (err) { console.warn(err) }
}
</script>
</body>