From df40bcbfb164f6fa21ad3ff017b45617cb6c460e Mon Sep 17 00:00:00 2001 From: senta_mandutz Date: Fri, 8 Feb 2019 14:59:19 +0100 Subject: [PATCH] reverse for; removed / from serviceworker --- public/createMessage.js | 8 ++++---- public/home.js | 2 +- public/main.js | 2 +- public/serviceWorker.js | 32 ++++++++++++++++---------------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/public/createMessage.js b/public/createMessage.js index 3aa2536..1206149 100644 --- a/public/createMessage.js +++ b/public/createMessage.js @@ -5,19 +5,19 @@ const CreateMsgRouter = {
- +
- +
- +
- +
diff --git a/public/home.js b/public/home.js index 6f21712..9a92342 100644 --- a/public/home.js +++ b/public/home.js @@ -2,7 +2,7 @@ const HomeRouter = { template: `
diff --git a/public/main.js b/public/main.js index 485c57b..6a14c6a 100644 --- a/public/main.js +++ b/public/main.js @@ -7,7 +7,7 @@ if ('serviceWorker' in navigator) { window.addEventListener('load', function () { // Register a service worker hosted at the root of the // site using the default scope ('/'). - return navigator.serviceWorker.register('/serviceWorker.js', { + return navigator.serviceWorker.register('serviceWorker.js', { scope: '/' }).then(function (registration) { return console.log('[ServiceWorker] Registration succeeded: ', registration); diff --git a/public/serviceWorker.js b/public/serviceWorker.js index 504db2c..5a624f2 100644 --- a/public/serviceWorker.js +++ b/public/serviceWorker.js @@ -6,21 +6,21 @@ const staticCacheKey = cacheKey + 's-v' + '1'; const dataCacheKey = casheKey + 'd-v' + '1'; const staticFilesToCache = [ '/', - '/manifest.json', - '/index.html', - '/message.html', - '/bookmark.js', - '/createMessage.js', - '/files.js', - '/home.js', - '/main.js', - '/profil.js', - '/favicon.ico', - '/img/th_nbg_ohmicon_amp.png', - '/lib/jquery-3.3.1.min.js', - '/lib/vue.js', - '/lib/vue-router.js', - '/style/style.css', + 'manifest.json', + 'index.html', + 'message.html', + 'bookmark.js', + 'createMessage.js', + 'files.js', + 'home.js', + 'main.js', + 'profil.js', + 'favicon.ico', + 'img/th_nbg_ohmicon_amp.png', + 'lib/jquery-3.3.1.min.js', + 'lib/vue.js', + 'lib/vue-router.js', + 'style/style.css', ]; const dataFilesToCache = [ '', @@ -76,7 +76,7 @@ self.addEventListener('activate', function(event) { // NOTE: Fetch structure // TODO: Setup fetching method self.addEventListener('fetch', function(event) { - const dataUrl = ' localhost:8888/'; // Provide HTTPS URL for query data. + const dataUrl = ' localhost:8013/'; // Provide HTTPS URL for query data. // const url = new URL(event.request.url); console.log('[ServiceWorker] Fetch', event.request.url);