Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cycletracker/html_and_css/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// JS file for cycleTracker app
// will be covered in the javascript functionality
// section of this tutorial
3 changes: 2 additions & 1 deletion cycletracker/manifest_file/cycletracker.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion cycletracker/service_workers/cycletracker.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions cycletracker/service_workers/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down