From fbfd66f18fca3a3d5cf46001eaf1661bd63bbf6d Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Thu, 12 May 2022 17:12:21 -0700 Subject: web: support installing as progressive web app™ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/static/dartboat.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'web/static/dartboat.js') 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'); -- cgit v1.2.3-70-g09d2