This commit is contained in:
Joey Kimsey
2025-02-25 14:03:12 -05:00
parent c40b29e812
commit 46390c2447
21 changed files with 197 additions and 60 deletions

View File

@ -25,26 +25,28 @@ if ( ! localStorage.getItem("pwaInstallDismissed") ) {
deferredPrompt = event;
installPrompt.classList.remove("d-none");
installPrompt.classList.add("d-block"); // Show the alert
chromeMessage.classList.remove("d-none");
chromeMessage.classList.add("d-block"); // Show the prompt
if ( chromeMessage ) {
chromeMessage.classList.remove("d-none");
chromeMessage.classList.add("d-block"); // Show the prompt
}
});
if ( isIos() && ! isInStandaloneMode() ) {
installPrompt.classList.remove("d-none");
installPrompt.classList.add("d-block"); // Show the alert
iosMessage.classList.remove("d-none");
iosMessage.classList.add("d-block"); // Show the prompt
if ( iosMessage ) {
iosMessage.classList.remove("d-none");
iosMessage.classList.add("d-block"); // Show the prompt
}
}
}
// ios REQUIRES a service worker
if ( 'serviceWorker' in navigator ) {
navigator.serviceWorker.register('app/js/sw.js')
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js')
.then(() => console.log('Service Worker Registered'));
}
// self.addEventListener('install', () => self.skipWaiting());
// self.addEventListener('activate', () => self.clients.claim());
// self.addEventListener('fetch', () => {}); // No file interception
// Handle Install Button Click
if ( installButton ) {
@ -299,6 +301,7 @@ document.querySelectorAll('[data-bs-toggle="collapse"]').forEach(button => {
});
// this should load all popovers
document.addEventListener("DOMContentLoaded", function () {
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));