-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-tap-auto-expand
- Loading branch information
Showing
34 changed files
with
883 additions
and
389 deletions.
There are no files selected for viewing
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
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
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
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
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
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 @@ | ||
{:project "book-of-clerk"} |
This file was deleted.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
{:version {:major 0, :minor 14, :rev-count 919}} | ||
{:version {:major 0, :minor 15, :rev-count 957}} |
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,54 @@ | ||
const cacheName = 'clerk-browser-cache-v2'; | ||
|
||
const hosts = [ | ||
'https://fonts.bunny.net', | ||
'https://cdn.skypack.dev', | ||
'https://cdn.tailwindcss.com', | ||
'https://storage.clerk.garden', | ||
'https://cdn.jsdelivr.net', | ||
'https://vega.github.io' | ||
]; | ||
|
||
self.addEventListener('install', function(event) { | ||
//console.log('install', event); | ||
self.skipWaiting(); | ||
}); | ||
|
||
self.addEventListener('activate', function(event) { | ||
//console.log('activate', event); | ||
|
||
// Remove unwanted caches | ||
event.waitUntil( | ||
caches.keys().then(function(cacheNames) { | ||
return Promise.all( | ||
cacheNames.map(function(cache) { | ||
if (cache !== cacheName) { | ||
console.log("Service Worker: Clearing old cache"); | ||
return caches.delete(cache); | ||
} | ||
})); | ||
})); | ||
|
||
return self.clients.claim() | ||
}); | ||
|
||
self.addEventListener('fetch', function(event) { | ||
//console.log(event); | ||
|
||
event.respondWith( | ||
caches.match(event.request).then(function(response) { | ||
return response || fetch(event.request).then(function(response) { | ||
|
||
hosts.map(function(host) { | ||
if (event.request.url.indexOf(host) === 0) { | ||
var clonedResponse = response.clone(); | ||
caches.open(cacheName).then(function(cache) { | ||
cache.put(event.request, clonedResponse); | ||
}); | ||
} | ||
}); | ||
return response; | ||
}); | ||
}) | ||
); | ||
}); |
Oops, something went wrong.