Add sticker timeline and offline model caching
This commit is contained in:
1 parent
ddb6f4a5e1
commit
1cc16c8c2f
65 files changed
+4432
-373
No files matched your search
@@ -0,0 +1,14 @@
|
||||
const MODEL_CACHE_WORKER_URL = "/model-cache-sw.js";
|
||||
|
||||
export function registerModelCacheServiceWorker() {
|
||||
if (typeof navigator === "undefined" || !("serviceWorker" in navigator)) {
|
||||
return;
|
||||
}
|
||||
|
||||
navigator.serviceWorker
|
||||
.register(MODEL_CACHE_WORKER_URL)
|
||||
.then((registration) => registration.update().catch(() => {}))
|
||||
.catch((error) => {
|
||||
console.warn("Model cache service worker registration failed.", error);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user