diff --git a/cycletracker/html_and_css/app.js b/cycletracker/html_and_css/app.js new file mode 100644 index 0000000..9cc6667 --- /dev/null +++ b/cycletracker/html_and_css/app.js @@ -0,0 +1,3 @@ +// JS file for cycleTracker app +// will be covered in the javascript functionality +// section of this tutorial \ No newline at end of file diff --git a/cycletracker/manifest_file/cycletracker.json b/cycletracker/manifest_file/cycletracker.json index a05e0f5..f9b5901 100644 --- a/cycletracker/manifest_file/cycletracker.json +++ b/cycletracker/manifest_file/cycletracker.json @@ -2,7 +2,8 @@ "name": "cycleTracker: Period Tracking app", "short_name": "CT", "description": "Securely and confidentially track your menstrual cycle. Enter the start and end dates of your periods, saving your private data to your browser on your device, without sharing it with the rest of the world.", - "start_url": "/", + "start_url": "./", + "scope": ".", "theme_color": "#eeffee", "background_color": "#eeffee", "display": "standalone", diff --git a/cycletracker/service_workers/cycletracker.json b/cycletracker/service_workers/cycletracker.json index a05e0f5..f9b5901 100644 --- a/cycletracker/service_workers/cycletracker.json +++ b/cycletracker/service_workers/cycletracker.json @@ -2,7 +2,8 @@ "name": "cycleTracker: Period Tracking app", "short_name": "CT", "description": "Securely and confidentially track your menstrual cycle. Enter the start and end dates of your periods, saving your private data to your browser on your device, without sharing it with the rest of the world.", - "start_url": "/", + "start_url": "./", + "scope": ".", "theme_color": "#eeffee", "background_color": "#eeffee", "display": "standalone", diff --git a/cycletracker/service_workers/sw.js b/cycletracker/service_workers/sw.js index 77d5b90..4f3fd3e 100644 --- a/cycletracker/service_workers/sw.js +++ b/cycletracker/service_workers/sw.js @@ -6,11 +6,11 @@ const CACHE_NAME = `period-tracker-${VERSION}`; // The static resources that the app needs to function. const APP_STATIC_RESOURCES = [ - "/", - "/index.html", - "/app.js", - "/style.css", - "/icons/wheel.svg", + "./", + "./index.html", + "./app.js", + "./style.css", + "./icons/wheel.svg", ]; // On install, cache the static resources @@ -45,7 +45,7 @@ self.addEventListener("activate", (event) => { self.addEventListener("fetch", (event) => { // As a single page app, direct app to always go to cached home page. if (event.request.mode === "navigate") { - event.respondWith(caches.match("/")); + event.respondWith(caches.match("./")); return; }