// This was created/generated by Claude AI LLM there may be errors present.

if ('serviceWorker' in navigator) {         // Setup — initialises and adds service worker to page
  window.addEventListener('load', () => {
    navigator.serviceWorker
      .register('/service-worker.js')
      .then(reg => console.log('Service worker registered:', reg.scope))
      .catch(err => console.error('Registration failed:', err));
  });
}