summaryrefslogtreecommitdiff
path: root/web/static/dartboat.js
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-12 17:12:21 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-12 17:12:21 -0700
commitfbfd66f18fca3a3d5cf46001eaf1661bd63bbf6d (patch)
treebac8bfc8dd4a87f3fe6e99c8e5edaa0a081ee875 /web/static/dartboat.js
parentdfac0ec143c2c6cae9bf9cf98673b5bf3a870e1c (diff)
downloaddartboat-fbfd66f18fca3a3d5cf46001eaf1661bd63bbf6d.tar.gz
dartboat-fbfd66f18fca3a3d5cf46001eaf1661bd63bbf6d.tar.xz
web: support installing as progressive web app™
Diffstat (limited to 'web/static/dartboat.js')
-rw-r--r--web/static/dartboat.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/web/static/dartboat.js b/web/static/dartboat.js
index f2593f7..39e0371 100644
--- a/web/static/dartboat.js
+++ b/web/static/dartboat.js
@@ -194,3 +194,6 @@ document.addEventListener('keydown', e => {
else if (e.key == 'u')
promptHandle('undo');
});
+
+if ('serviceWorker' in navigator)
+ navigator.serviceWorker.register('sw.js');