Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmixcom authored Sep 29, 2023
1 parent 2a3a420 commit 1135924
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Report With Zymono</title>
<link rel="manifest" href="/manifest.json">
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js')
.then(registration => {
console.log('Service worker registered:', registration);
registration.addEventListener('message', event => {
const {title, options} = event.data;
showNotification(title, options);
});
})
.catch(error => {
console.error('Error registering service worker:', error);
});
});
}
</script>
<style>
body {
font-family: Arial, sans-serif;
Expand Down Expand Up @@ -89,4 +107,4 @@ <h2>Report</h2>
</div>
<script src="script.js"></script>
</body>
</html>
</html>

0 comments on commit 1135924

Please sign in to comment.