1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-04 19:14:41 +00:00

uwuzu v1.4.12 Funium

This commit is contained in:
Daichimarukana
2025-01-12 20:01:08 +09:00
parent 79328e826c
commit a8b9ad0333
119 changed files with 1656 additions and 4598 deletions
+34 -30
View File
@@ -1,45 +1,49 @@
var CACHE_NAME = "app_uwuzu";
var CACHE_NAME = "app_uwuzu";
var urlsToCache = [
"home/index.php",
"home/ftl.php",
"notification/index.php",
"search/index.php",
"require/botbox.php",
"require/leftbox.php",
"require/rightbox.php",
"require/botbox.php",
"user/index.php",
"settings/index.php",
"rule/terms.php",
"rule/privacypolicy.php",
"rule/uwuzuabout.php",
"index.php",
"login.php",
"new.php",
"check.php",
"success.php",
"img/",
"/home/index.php",
"/unsupported.php",
];
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open(CACHE_NAME)
.then(
function(cache){
.then(function(cache) {
return cache.addAll(urlsToCache);
}).catch(function(error) {
console.error("Failed to cache:", error);
})
);
});
/*
self.addEventListener('fetch', function(event) {
event.respondWith(
caches.match(event.request)
.then(
function (response) {
if (response) {
return response;
}
return fetch(event.request);
})
caches.match(event.request)
.then(function(response) {
if (response) {
return response;
}
var url = new URL(event.request.url);
if (!url.pathname.includes(".")) {
if (!url.pathname.endsWith('/')) {
url.pathname += '/';
}
return caches.match(url.pathname + "index.php");
}
return fetch(event.request)
.then(function(networkResponse) {
return caches.open("app_uwuzu").then(function(cache) {
cache.put(event.request, networkResponse.clone());
return networkResponse;
});
})
.catch(function() {
return caches.match('/unsupported.php');
});
})
);
});
*/