mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-20 12:15:06 -04:00
9 lines
257 B
TypeScript
9 lines
257 B
TypeScript
import version from "../data/version.json";
|
|
if (
|
|
"serviceWorker" in navigator &&
|
|
window.location.href.endsWith("/index.html?isPWA=true")
|
|
) {
|
|
// @ts-ignore
|
|
const url = new URL("sw-b71.js", import.meta.url);
|
|
navigator.serviceWorker.register(url);
|
|
}
|