Add basic PWA support

This commit is contained in:
Jason Halvorson authored and Samuel H committed 2024-04-10 13:11:43 -04:00
1 parent a9040edc84
commit 0ac58c3349
4 files changed
+41 -1

No files matched your search

+16 -1
View File
@@ -10,7 +10,7 @@
<meta property="og:description" content="A Pokémon fangame heavily inspired by the roguelite genre. Battle endlessly while gathering stacking items, exploring many different biomes, and reaching Pokémon stats you never thought possible." />
<meta property="og:image" content="https://pokerogue.net/logo.png" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<style type="text/css">
@font-face {
font-family: 'emerald';
@@ -23,6 +23,21 @@
}
</style>
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="manifest" href="manifest.json" />
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", function () {
navigator.serviceWorker.register("/service-worker.js").then(
function (registration) {
console.log("ServiceWorker registration successful");
},
function (err) {
console.log("ServiceWorker registration failed: ", err);
},
);
});
}
</script>
</head>
<body>