service worker
This commit is contained in:
parent
d8bc06f08d
commit
dc3f04377b
11
index.html
11
index.html
|
|
@ -4518,6 +4518,17 @@ for (var k = 0; k < b0.split(" AND ").length; k++) {
|
||||||
deferredPrompt.prompt();
|
deferredPrompt.prompt();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
if ('serviceWorker' in navigator) { // Register service worker for Chrome PWA
|
||||||
|
window.addEventListener('load', function() {
|
||||||
|
navigator.serviceWorker.register('/sw.js').then(function(registration) {
|
||||||
|
// Registration was successful
|
||||||
|
console.log('ServiceWorker registration successful with scope: ', registration.scope);
|
||||||
|
}, function(err) {
|
||||||
|
// registration failed :(
|
||||||
|
console.log('ServiceWorker registration failed: ', err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
shiftDown = 0;
|
shiftDown = 0;
|
||||||
// If the user presses [ or -, decrease the mouse size by 2
|
// If the user presses [ or -, decrease the mouse size by 2
|
||||||
document.addEventListener("keydown", function(e) {
|
document.addEventListener("keydown", function(e) {
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,11 @@
|
||||||
"src": "icons/apple-touch-icon.png?v=2",
|
"src": "icons/apple-touch-icon.png?v=2",
|
||||||
"sizes": "180x180",
|
"sizes": "180x180",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "icons/apple-touch-icon-144x144.png?v=2",
|
||||||
|
"sizes": "144x144",
|
||||||
|
"type": "image/png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue