Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/lichess-org/lila
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Oct 16, 2024
2 parents f73d3a4 + edb84b2 commit 004e474
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/site/src/serviceWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { storage } from 'common/storage';

export default async function () {
if (!('serviceWorker' in navigator && 'Notification' in window && 'PushManager' in window)) return;
const workerUrl = new URL(assetUrl(jsModule('serviceWorker'), { pathOnly: true }), self.location.href);
const workerUrl = new URL(
assetUrl(jsModule('serviceWorker'), { pathOnly: true, version: false }),
self.location.href,
);
workerUrl.searchParams.set('asset-url', document.body.getAttribute('data-asset-url')!);
const reg = await navigator.serviceWorker.register(workerUrl.href, {
scope: '/',
Expand Down

0 comments on commit 004e474

Please sign in to comment.