Deploy 2026-06-15T16:17:09.309Z
This commit is contained in:
14
index.html
14
index.html
@@ -6,10 +6,24 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="theme-color" content="#1a1a2e" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<title>Diet Coach</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/sw.js').then(reg => {
|
||||
reg.addEventListener('updatefound', () => {
|
||||
const sw = reg.installing;
|
||||
sw.addEventListener('statechange', () => {
|
||||
if (sw.state === 'activated') window.location.reload();
|
||||
});
|
||||
});
|
||||
setInterval(() => reg.update(), 60000);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user