summaryrefslogtreecommitdiffstats
path: root/client/00-startup.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-04-30 06:54:48 +0300
committerLauri Ojansivu <x@xet7.org>2020-04-30 06:54:48 +0300
commit8d5adc04645e3e71423f16869f39b8d79969bccd (patch)
tree625e815a874b79a1e29ba45a83fd490f8cbd6a28 /client/00-startup.js
parentc7d4a90d5cacb8dab205f122a6e2d9bca88e767b (diff)
downloadwekan-8d5adc04645e3e71423f16869f39b8d79969bccd.tar.gz
wekan-8d5adc04645e3e71423f16869f39b8d79969bccd.tar.bz2
wekan-8d5adc04645e3e71423f16869f39b8d79969bccd.zip
Install Wekan to mobile homescreen icon and use fullscreen PWA.
Docs at https://github.com/wekan/wekan/wiki/PWA Thanks to xet7 ! Closes #2879
Diffstat (limited to 'client/00-startup.js')
-rw-r--r--client/00-startup.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/00-startup.js b/client/00-startup.js
new file mode 100644
index 00000000..4a717b67
--- /dev/null
+++ b/client/00-startup.js
@@ -0,0 +1,6 @@
+// PWA
+if ('serviceWorker' in navigator) {
+ window.addEventListener('load', function() {
+ navigator.serviceWorker.register('/pwa-service-worker.js');
+ });
+}