+
+
@@ -59,7 +63,7 @@
}
function start() {
- if (tries >= 2) return fail('The offline copy could not start.');
+ if (tries >= 2) return fail('Setup could not finish.');
try { sessionStorage.setItem('boot:tries', String(tries + 1)); } catch (err) {}
navigator.serviceWorker.register('sw.js').then(function (registration) {
@@ -67,12 +71,12 @@
// controlled yet. Otherwise wait for the one installing to get there.
if (registration.active) return go();
var worker = registration.installing || registration.waiting;
- if (!worker) return fail('The offline copy did not install.');
+ if (!worker) return fail('Setup did not start.');
worker.addEventListener('statechange', function (event) {
if (event.target.state === 'activated') go();
});
}, function (err) {
- fail('Could not install the offline copy: ' + err.message);
+ fail('Setup failed: ' + err.message);
});
}
@@ -86,7 +90,7 @@
}
if ('serviceWorker' in navigator) start();
- else fail('This browser has no service worker support.');
+ else fail('Setup needs service workers, which this browser does not have.');
})();