1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-30 18:20:15 +02:00

service-worker-registration: fix condition to load sw

This commit is contained in:
Kushagra Gour
2018-06-23 10:15:30 +05:30
parent 518060e91f
commit e0ec2a0302

View File

@@ -18,9 +18,9 @@
if (
'serviceWorker' in navigator &&
location.protocol === 'https:' &&
document.cookie.indexOf('wmdebug') === -1 &&
location.href.indexOf('chrome-extension://') === -1 &&
location.href.indexOf('localhost') === -1 &&
location.href.indexOf('192.168') === -1
) {
// Delay registration until after the page has loaded, to ensure that our