User:GWicke/sw-setup.js

if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/w/index.php?title=User:GWicke/sw.js&action=raw&ctype=text/javascript&maxage=300', {   	scope: '/w/iki/'    }) .then(function(registration) {       // Registration was successful        console.log('ServiceWorker registration successful with scope: ', registration.scope);   }).catch(function(err) {        // registration failed :( console.log('ServiceWorker registration failed: ', err); }); }