made percoshons for the server list just in cas my mom umplugs my server

This commit is contained in:
2026-03-31 17:51:45 -05:00
parent 63d4ec0009
commit 3d1005a72c
+12 -1
View File
@@ -55,9 +55,20 @@
cachedItems = Array.isArray(data.items) ? data.items : [];
return cachedItems;
}).catch(()=>{
return fetch('server/data.txt', {cache:'no-store'}).then(r=>r.text()).then(txt=>{
return fetch('server/data.txt', {cache:'no-store'}).then(r=>{
if(!r.ok) throw new Error('server data unavailable');
return r.text();
}).then(txt=>{
cachedItems = parseData(txt);
return cachedItems;
}).catch(()=>{
return fetch('data.txt', {cache:'no-store'}).then(r=>{
if(!r.ok) throw new Error('static data unavailable');
return r.text();
}).then(txt=>{
cachedItems = parseData(txt);
return cachedItems;
});
});
});
}