Update Tab Icon; Organize ServiceWorker
This commit is contained in:
parent
63e1363dd2
commit
07a2480e19
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- NOTE: Icon for tab recognition -->
|
||||
<!-- highest resolution for Chrome & Opera -->
|
||||
<link rel="icon" sizes="192x192" href="/public/img/app_icon.png">
|
||||
<link rel="icon" sizes="192x192" href="favicon.ico">
|
||||
<!-- icons for Safari -> iOS Icons -->
|
||||
<!-- icons for IE & Windows phone -->
|
||||
<meta name="msapplication-square70x70logo" content="icon_smalltile.png">
|
||||
|
@ -2,11 +2,10 @@
|
||||
* Main JavaScript file - Entry point of all JS files *
|
||||
******************************************************/
|
||||
|
||||
// NOTE: ServiceWorker Registration
|
||||
// Wait until page loaded
|
||||
window.addEventListener('load', () => {
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function () {
|
||||
// Register a service worker hosted at the root of the
|
||||
// site using the default scope ('/').
|
||||
// NOTE: ServiceWorker Registration
|
||||
return navigator.serviceWorker.register('serviceWorker.js', {
|
||||
scope: '/'
|
||||
}).then(function (registration) {
|
||||
@ -14,10 +13,11 @@ if ('serviceWorker' in navigator) {
|
||||
}).catch(function (error) {
|
||||
return console.log('[Service worker] Registration failed: ', error);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
console.log('[ServiceWorker] are not supported.');
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
// NOTE: Set Bootstrap materialdesign
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
@ -107,7 +107,6 @@ self.addEventListener('activate', event => {
|
||||
/* ========================================= */
|
||||
/* NOTE: Fetch: Update logic for cache files */
|
||||
/* ========================================= */
|
||||
|
||||
self.addEventListener('fetch', event => {
|
||||
// Provide HTTPS URL for query data.
|
||||
const dataUrl = 'https://me.efi.th-nuernberg.de/om/';
|
||||
|
Loading…
x
Reference in New Issue
Block a user