e8e5b61404
* feat: added service worker and pwa optimizations * fix: added newline at the end of Gemfile.lock to match main branch * fix: fixed newline at the end of Gemfile.lock to match main branch
11 lines
No EOL
332 B
JavaScript
11 lines
No EOL
332 B
JavaScript
document.addEventListener('DOMContentLoaded', init, false);
|
|
function init() {
|
|
if ('serviceWorker' in navigator) {
|
|
navigator.serviceWorker.register('/images/service-worker.js')
|
|
.then((reg) => {
|
|
// Service worker registration confirmed
|
|
}, (err) => {
|
|
// Service worker registration error
|
|
});
|
|
}
|
|
} |