-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Soumik
committed
Aug 10, 2024
1 parent
f52eafa
commit 85f790b
Showing
7 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Attendance Manager</title> | ||
<script type="module" crossorigin src="/assets/index-BMTndMwK.js"></script> | ||
<link rel="stylesheet" crossorigin href="/assets/index-DRYsq2w4.css"> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script> | ||
if('serviceWorker' in navigator) { | ||
window.addEventListener('load', () => { | ||
navigator.serviceWorker.register('./serviceworker.js') | ||
.then((reg) => console.log('Success: ', reg.scope)) | ||
.catch((err) => console.log('Failure: ', err)); | ||
}) | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "Attendance Manager", | ||
"icons": | ||
[{"src": "/vite.svg","type": "image/svg+xml", | ||
"sizes": "1024x1024", | ||
"purpose": "any maskable"}], | ||
"start_url": ".", | ||
"short_name": "Attendance", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const CACHE_NAME = "version-1"; | ||
const urlsToCache = [ 'index.html', 'offline.html' ];const self = this;// Install SW | ||
self.addEventListener('install', (event) => { | ||
event.waitUntil( | ||
caches.open(CACHE_NAME) | ||
.then((cache) => { | ||
console.log('Opened cache');return cache.addAll(urlsToCache); | ||
}) | ||
) | ||
});// Listen for requests | ||
self.addEventListener('fetch', (event) => { | ||
event.respondWith( | ||
caches.match(event.request) | ||
.then(() => { | ||
return fetch(event.request) | ||
.catch(() => caches.match('offline.html')) | ||
}) | ||
) | ||
});// Activate the SW | ||
self.addEventListener('activate', (event) => { | ||
const cacheWhitelist = []; | ||
cacheWhitelist.push(CACHE_NAME);event.waitUntil( | ||
caches.keys().then((cacheNames) => Promise.all( | ||
cacheNames.map((cacheName) => { | ||
if(!cacheWhitelist.includes(cacheName)) { | ||
return caches.delete(cacheName); | ||
} | ||
}) | ||
))) | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.