mirror of
https://github.com/myronblair/tomsjavajive
synced 2026-06-30 17:50:32 -05:00
Fix console warnings: remove SW registration, fix meta tag, clean manifest
- Remove service worker registration from footer (SW is already self-unregistering) - Add mobile-web-app-capable meta to fix deprecation warning - Remove missing icon references from manifest (only 192/512 PNGs exist) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-16
@@ -72,22 +72,7 @@
|
||||
</footer>
|
||||
|
||||
<script src="/assets/js/main.js?v=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/assets/js/main.js') ?>"></script>
|
||||
|
||||
<!-- PWA Service Worker Registration -->
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js')
|
||||
.then(registration => {
|
||||
console.log('SW registered:', registration.scope);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('SW registration failed:', error);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<?php if (isset($extraScripts)) echo $extraScripts; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -59,6 +59,7 @@ $customerUser = $isLoggedIn ? CustomerAuth::getUser() : null;
|
||||
|
||||
<!-- PWA Meta Tags -->
|
||||
<meta name="theme-color" content="#FF5E1A">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="Java Jive">
|
||||
|
||||
@@ -8,48 +8,12 @@
|
||||
"theme_color": "#FF5E1A",
|
||||
"orientation": "portrait-primary",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/assets/icons/icon-72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/icons/icon-96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/icons/icon-128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/icons/icon-144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/icons/icon-152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/icons/icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/icons/icon-384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/icons/icon-512.png",
|
||||
"sizes": "512x512",
|
||||
@@ -58,48 +22,6 @@
|
||||
}
|
||||
],
|
||||
"categories": ["food", "shopping"],
|
||||
"screenshots": [
|
||||
{
|
||||
"src": "/assets/screenshots/home.png",
|
||||
"sizes": "1280x720",
|
||||
"type": "image/png",
|
||||
"form_factor": "wide",
|
||||
"label": "Homepage"
|
||||
},
|
||||
{
|
||||
"src": "/assets/screenshots/shop.png",
|
||||
"sizes": "1280x720",
|
||||
"type": "image/png",
|
||||
"form_factor": "wide",
|
||||
"label": "Shop"
|
||||
}
|
||||
],
|
||||
"shortcuts": [
|
||||
{
|
||||
"name": "Shop Coffee",
|
||||
"short_name": "Shop",
|
||||
"description": "Browse our coffee selection",
|
||||
"url": "/shop.php",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/assets/icons/shop-icon.png",
|
||||
"sizes": "96x96"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "My Orders",
|
||||
"short_name": "Orders",
|
||||
"description": "View your orders",
|
||||
"url": "/account/orders.php",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/assets/icons/orders-icon.png",
|
||||
"sizes": "96x96"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"related_applications": [],
|
||||
"prefer_related_applications": false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user