Skip to content

Commit

Permalink
Remove/comment out old test code
Browse files Browse the repository at this point in the history
  • Loading branch information
FormularSumo committed Sep 12, 2024
1 parent 7243a13 commit 227f5ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 6 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,9 @@
<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" });
// console.log({ state: "updated" });
location.reload()
});
}
Expand All @@ -179,11 +178,11 @@
<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.");
}
// 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 All @@ -197,9 +196,6 @@
if (document.body.requestFullscreen == undefined && document.body.webkitRequestFullscreen == undefined && document.body.mozRequestFullScreen == undefined ) {
document.getElementById("fullscreen-toggle").remove(); //Remove fullscreenbutton on iOS where it's not supported..
}
console.log(document.body.requestFullscreen);
console.log(document.body.webkitRequestFullscreen);
console.log(document.body.mozRequestFullScreen);
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions sw.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const CACHE_NAME = `0.12.0.4`; // stable.pre-release.minor.web
const CACHE_NAME = `0.12.0.5`; // stable.pre-release.minor.web

// Use the install event to pre-cache all initial resources.
self.addEventListener('install', event => {
self.skipWaiting();

event.waitUntil((async () => {
const cache = await caches.open(CACHE_NAME);
console.log("Content downloading")
// console.log("Content downloading")
cache.addAll([
// '/'
'index.html',
Expand Down

0 comments on commit 227f5ff

Please sign in to comment.