mirror of
https://github.com/chinchang/web-maker.git
synced 2025-08-01 11:00:28 +02:00
service-worker-registration: fix condition to load sw
This commit is contained in:
@@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
'serviceWorker' in navigator &&
|
'serviceWorker' in navigator &&
|
||||||
|
location.protocol === 'https:' &&
|
||||||
document.cookie.indexOf('wmdebug') === -1 &&
|
document.cookie.indexOf('wmdebug') === -1 &&
|
||||||
location.href.indexOf('chrome-extension://') === -1 &&
|
location.href.indexOf('chrome-extension://') === -1 &&
|
||||||
location.href.indexOf('localhost') === -1 &&
|
|
||||||
location.href.indexOf('192.168') === -1
|
location.href.indexOf('192.168') === -1
|
||||||
) {
|
) {
|
||||||
// Delay registration until after the page has loaded, to ensure that our
|
// Delay registration until after the page has loaded, to ensure that our
|
||||||
|
Reference in New Issue
Block a user