-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"id": "chromatone-pitch-table", | ||
"name": "Pitch Table", | ||
"short_name": "Pitch Table", | ||
"description": "An expandable table of all possible notes to make sounds and rhythms", | ||
"start_url": "/", | ||
"background_color": "#999", | ||
"theme_color": "#999", | ||
"display": "standalone", | ||
"orientation": "any", | ||
"display_override": ["window-controls-overlay", "minimal-ui", "standalone"], | ||
"handle_links": "preferred", | ||
"prefer_related_applications": false, | ||
"categories": ["music", "audio", "tools"], | ||
"icons": [ | ||
{ | ||
"src": "./logo.svg", | ||
"sizes": "any", | ||
"type": "image/svg+xml", | ||
"purpose": "any" | ||
}, | ||
{ | ||
"src": "./logo.png", | ||
"sizes": "1600x1600", | ||
"type": "image/png", | ||
"purpose": "any" | ||
} | ||
], | ||
|
||
"launch_handler": { | ||
"client_mode": ["focus-existing", "auto"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const CACHE_NAME = 'chromatone-random-jam-v.0.2.0'; | ||
const ASSETS_TO_CACHE = [ | ||
'/', | ||
'/index.html', | ||
'/logo.svg', | ||
'102_logo.svg' | ||
]; | ||
|
||
// Install Service Worker | ||
self.addEventListener('install', (event) => { | ||
self.skipWaiting() | ||
event.waitUntil( | ||
caches.open(CACHE_NAME).then((cache) => { | ||
return cache.addAll(ASSETS_TO_CACHE); | ||
}) | ||
); | ||
}); | ||
|
||
// Activate Service Worker | ||
self.addEventListener('activate', (event) => { | ||
event.waitUntil( | ||
caches.keys().then((cacheNames) => { | ||
return Promise.all( | ||
cacheNames.map((cacheName) => { | ||
if (cacheName !== CACHE_NAME) { | ||
return caches.delete(cacheName); // Clean up old caches | ||
} | ||
}) | ||
); | ||
}) | ||
); | ||
self.clients.claim(); | ||
}); | ||
|
||
// Fetch assets (serve from cache or network) | ||
self.addEventListener('fetch', (event) => { | ||
event.respondWith( | ||
caches.match(event.request).then((cachedResponse) => { | ||
// Return cached response if available, otherwise fetch from network | ||
return cachedResponse || fetch(event.request); | ||
}) | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters