closed the chapter on close
This commit is contained in:
14
zuss/app.js
14
zuss/app.js
@@ -4,7 +4,7 @@
|
|||||||
* - Install/Update Overlay mit beforeinstallprompt.prompt()
|
* - Install/Update Overlay mit beforeinstallprompt.prompt()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const APP_VERSION = "2025.12.24.10";
|
const APP_VERSION = "2025.12.24.11";
|
||||||
const TOKEN = "T9e7WESBXxy6rSD";
|
const TOKEN = "T9e7WESBXxy6rSD";
|
||||||
const BASE = "https://home.x-s.at";
|
const BASE = "https://home.x-s.at";
|
||||||
const SHARE_DAV = `${BASE}/public.php/dav/files/${TOKEN}`;
|
const SHARE_DAV = `${BASE}/public.php/dav/files/${TOKEN}`;
|
||||||
@@ -331,8 +331,16 @@ async function registerSW() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function closeAushang(){
|
function closeAushang(){
|
||||||
const ret = encodeURIComponent(location.pathname + location.search);
|
try { window.close(); } catch {}
|
||||||
window.location.href = `./close.html?return=${ret}`;
|
// Fallbacks: first try history back, then blank
|
||||||
|
setTimeout(() => {
|
||||||
|
if (document.visibilityState === "hidden") return; // tab closed
|
||||||
|
history.back();
|
||||||
|
setTimeout(() => {
|
||||||
|
if (document.visibilityState === "hidden") return;
|
||||||
|
location.replace("about:blank");
|
||||||
|
}, 200);
|
||||||
|
}, 120);
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyTheme(t){
|
function applyTheme(t){
|
||||||
|
|||||||
@@ -169,6 +169,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="./app.js?v=2025.12.24.10"></script>
|
<script src="./app.js?v=2025.12.24.11"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
const CACHE = "wfw-aushang-2025.12.24.10";
|
const CACHE = "wfw-aushang-2025.12.24.11";
|
||||||
|
|
||||||
const ASSETS = [
|
const ASSETS = [
|
||||||
"/zuss/",
|
"/zuss/",
|
||||||
"/zuss/index.html",
|
"/zuss/index.html",
|
||||||
"/zuss/close.html",
|
|
||||||
"/zuss/app.js",
|
"/zuss/app.js",
|
||||||
"/zuss/manifest.webmanifest",
|
"/zuss/manifest.webmanifest",
|
||||||
"/zuss/version.json",
|
"/zuss/version.json",
|
||||||
@@ -41,7 +40,7 @@ self.addEventListener("fetch", (event) => {
|
|||||||
return fresh;
|
return fresh;
|
||||||
} catch {
|
} catch {
|
||||||
const cached = await caches.match(req);
|
const cached = await caches.match(req);
|
||||||
return cached || new Response('{"version":"2025.12.24.10"}', { headers: { "Content-Type": "application/json" } });
|
return cached || new Response('{"version":"2025.12.24.11"}', { headers: { "Content-Type": "application/json" } });
|
||||||
}
|
}
|
||||||
})());
|
})());
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{ "version": "2025.12.24.10" }
|
{ "version": "2025.12.24.11" }
|
||||||
|
|||||||
Reference in New Issue
Block a user