Disable service worker on Cordova and NW.js platforms

This commit is contained in:
Skylar Ittner 2020-01-08 01:11:51 -07:00
parent 664d54ae97
commit 08d7ff224d
2 changed files with 12 additions and 13 deletions

View File

@ -66,6 +66,7 @@
<script src="assets/js/main.js"></script>
<script>
if (platform_type != "cordova" && platform_type != "nw") {
if ('serviceWorker' in navigator) {
// Register a service worker hosted at the root of the
// site using the default scope.
@ -77,4 +78,5 @@
} else {
console.log('Service workers are not supported.');
}
}
</script>

View File

@ -40,9 +40,6 @@
],
"scope": "/",
"lang": "en-US",
"serviceworker": {
"src": "./sw.js"
},
"categories": ["navigation", "productivity", "utilities", "weather"],
"prefer_related_applications": true,
"related_applications": [