Disable service worker on Cordova and NW.js platforms
This commit is contained in:
parent
664d54ae97
commit
08d7ff224d
@ -66,6 +66,7 @@
|
|||||||
<script src="assets/js/main.js"></script>
|
<script src="assets/js/main.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
if (platform_type != "cordova" && platform_type != "nw") {
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
// Register a service worker hosted at the root of the
|
// Register a service worker hosted at the root of the
|
||||||
// site using the default scope.
|
// site using the default scope.
|
||||||
@ -77,4 +78,5 @@
|
|||||||
} else {
|
} else {
|
||||||
console.log('Service workers are not supported.');
|
console.log('Service workers are not supported.');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
@ -40,9 +40,6 @@
|
|||||||
],
|
],
|
||||||
"scope": "/",
|
"scope": "/",
|
||||||
"lang": "en-US",
|
"lang": "en-US",
|
||||||
"serviceworker": {
|
|
||||||
"src": "./sw.js"
|
|
||||||
},
|
|
||||||
"categories": ["navigation", "productivity", "utilities", "weather"],
|
"categories": ["navigation", "productivity", "utilities", "weather"],
|
||||||
"prefer_related_applications": true,
|
"prefer_related_applications": true,
|
||||||
"related_applications": [
|
"related_applications": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user