Skip to content

Commit

Permalink
Remove testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
FormularSumo committed Sep 20, 2024
1 parent 5e752da commit a23c902
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@
</head>
<body>
<canvas id="loadingCanvas" style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; display: block;" oncontextmenu="event.preventDefault()"></canvas>
<!-- <div id="game"> -->
<canvas id="canvas" style="visibility: hidden; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; display: block;" oncontextmenu="event.preventDefault()"></canvas>
<!-- </div> -->

<script type='text/javascript'>
var loadingContext = document.getElementById('loadingCanvas').getContext('2d');
Expand Down Expand Up @@ -148,32 +146,12 @@
}
</script>

<!-- <script>
function resizeCanvas() {
const canvas = document.getElementById('canvas');
const loadingCanvas = document.getElementById('loadingCanvas');
const width = canvas.clientWidth;
const height = canvas.clientHeight;
if (canvas.width !== width || canvas.height !== height) {
canvas.width = width;
canvas.height = height;
}
if (loadingCanvas.width !== width || loadingCanvas.height !== height) {
loadingCanvas.width = width;
loadingCanvas.height = height;
}
}
resizeCanvas();
window.addEventListener('resize', resizeCanvas);
</script> -->

<script>
if('serviceWorker' in navigator) {
navigator.serviceWorker.register('/Star-Wars-Galaxy-Collection-Web/sw.js', { scope: '/Star-Wars-Galaxy-Collection-Web/' });
navigator.serviceWorker.addEventListener('controllerchange', () => {
// This will be triggered when the service worker is replaced with a new one -- to ensure that game data is redownloaded if needed
// console.log({ state: "updated" });
location.reload()
});
}
Expand All @@ -182,11 +160,6 @@
<script>
if (navigator.storage && navigator.storage.persist) {
navigator.storage.persist().then((persistent) => {
// if (persistent) {
// console.log("Storage will not be cleared except by explicit user action");
// } else {
// console.log("Storage may be cleared by the UA under storage pressure.");
// }
});
}
</script>
Expand Down

0 comments on commit a23c902

Please sign in to comment.