aboutsummaryrefslogtreecommitdiff
path: root/assets/sw-register.js
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2020-04-12 20:50:03 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2020-04-12 20:50:03 +0200
commit9719692512325b5f88de666281ba286343408010 (patch)
tree2551be94373e26f668f8756bee493c9b11ee48e0 /assets/sw-register.js
parente4e43bd9b12a3e37f0d3c2760ea7f867ba8273a7 (diff)
Introduce serviceWorker, disabled by default
Diffstat (limited to 'assets/sw-register.js')
-rw-r--r--assets/sw-register.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/assets/sw-register.js b/assets/sw-register.js
new file mode 100644
index 0000000..583532c
--- /dev/null
+++ b/assets/sw-register.js
@@ -0,0 +1,6 @@
+if (navigator.serviceWorker) {
+ navigator.serviceWorker.register(
+ "{{ "/sw.js" | relURL }}",
+ { scope: "{{ "/" | relURL }}" }
+ );
+}