Skip to content

Commit

Permalink
Deploying to gh-pages from @ c4e2923 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
nenadalm committed Jan 6, 2024
1 parent 04de7ad commit 09263b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#121212">
<meta name="app-version" content="36c0badc5829cbe934d05564b8a51ac3cc8f25a8">
<meta name="app-version" content="c4e2923d953f12a85a407aa1760be0b1e6f0d74a">
<meta name="description" content="Simple life counter app that works offline.">
<title>Life counter</title>
<link rel="stylesheet" href="css/styles.9e19bd93a962bf6536dd8278190bfd72978658ef.css">
Expand Down
2 changes: 1 addition & 1 deletion js/app.7C040D89C8D45CD847E83929BE3F9348.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions worker.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const relatedAppVersion = "36c0badc5829cbe934d05564b8a51ac3cc8f25a8";
const relatedAppVersion = "c4e2923d953f12a85a407aa1760be0b1e6f0d74a";
const urlsToCache = ["index.html","manifest.json","img/icon.svg","js/app.7C040D89C8D45CD847E83929BE3F9348.js","css/styles.9e19bd93a962bf6536dd8278190bfd72978658ef.css"];

const cacheKey = `resources.${relatedAppVersion}`;
const cacheKeyPrefix = 'nenadalm.life-counter.';
const cacheKey = `${cacheKeyPrefix}.resources.${relatedAppVersion}`;

function ensureHtmlVersionMatches(cache) {
return cache.match(new Request('index.html'))
Expand All @@ -23,6 +24,7 @@ self.addEventListener('install', event => {
self.addEventListener('activate', event => {
event.waitUntil(
caches.keys()
.then(keys => keys.filter(key => key.startsWith(cacheKeyPrefix)))
.then(keys => keys.filter(key => key !== cacheKey))
.then(oldKeys => Promise.all(oldKeys.map(key => caches.delete(key))))
);
Expand Down

0 comments on commit 09263b7

Please sign in to comment.