mirror of
https://gitlab.com/vyla-entertainment/documentation.git
synced 2026-11-09 20:17:20 -05:00
updated manifest, and added a reset path
This commit is contained in:
@@ -15,13 +15,13 @@
|
|||||||
],
|
],
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "/assets/images/logo.png",
|
"src": "/assets/images/android-chrome-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "any maskable"
|
"purpose": "any maskable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "/assets/images/logo.png",
|
"src": "/assets/images/android-chrome-512x512.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "any maskable"
|
"purpose": "any maskable"
|
||||||
|
|||||||
34
reset/index.html
Normal file
34
reset/index.html
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<script>
|
||||||
|
(async () => {
|
||||||
|
localStorage.clear();
|
||||||
|
sessionStorage.clear();
|
||||||
|
|
||||||
|
if ("caches" in window) {
|
||||||
|
const caches = await window.caches.keys();
|
||||||
|
await Promise.all(caches.map(name => window.caches.delete(name)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("indexedDB" in window && indexedDB.databases) {
|
||||||
|
const databases = await indexedDB.databases();
|
||||||
|
|
||||||
|
await Promise.all(
|
||||||
|
databases
|
||||||
|
.map(db => db.name)
|
||||||
|
.filter(Boolean)
|
||||||
|
.map(name => new Promise(resolve => {
|
||||||
|
const request = indexedDB.deleteDatabase(name);
|
||||||
|
request.onsuccess = request.onerror = request.onblocked = resolve;
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (navigator.serviceWorker) {
|
||||||
|
const registrations = await navigator.serviceWorker.getRegistrations();
|
||||||
|
await Promise.all(
|
||||||
|
registrations.map(registration => registration.unregister())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
location.replace("/");
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user