1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-12 17:46:26 +02:00

service-worker-registration: add offline msg

This commit is contained in:
Kushagra Gour
2018-01-23 03:03:59 +05:30
parent 3a31d4b995
commit 4846a171c0

View File

@ -48,6 +48,9 @@ if ('serviceWorker' in navigator && document.cookie.indexOf('wmdebug') === -1) {
// At this point, everything has been precached.
// It's the perfect time to display a "Content is cached for offline use." message.
console.log('Content is now available offline!');
if (window.alertsService) {
window.alertsService.add('Web Maker is now ready to be used offline.');
}
}
break;