Skip to content

Commit

Permalink
Merge branch 'master' into show-opponent-rating-pref
Browse files Browse the repository at this point in the history
  • Loading branch information
yahya-lafhal authored Oct 16, 2024
2 parents 26c8be4 + edb84b2 commit 1d42d8d
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, version: false }), 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 1d42d8d

Please sign in to comment.