diff --git a/zuss/app.js b/zuss/app.js index 965dc2f..cc4601c 100644 --- a/zuss/app.js +++ b/zuss/app.js @@ -4,7 +4,7 @@ * - Install/Update Overlay mit beforeinstallprompt.prompt() */ -const APP_VERSION = "2025.12.24.8"; +const APP_VERSION = "2025.12.24.9"; const TOKEN = "T9e7WESBXxy6rSD"; const BASE = "https://home.x-s.at"; const SHARE_DAV = `${BASE}/public.php/dav/files/${TOKEN}`; @@ -327,22 +327,8 @@ async function registerSW() { } function closeAushang(){ - try { window.close(); } catch {} - // Some browsers block close() once we navigated to pdf.js and back; fallback to back/blank - setTimeout(() => { - if (document.visibilityState === "hidden") return; // tab closed or navigating - const ref = document.referrer || ""; - const cameFromPdf = ref.includes("/pdfjs/"); - if (ref && !cameFromPdf) { - history.back(); - setTimeout(() => { - if (document.visibilityState === "hidden") return; - location.href = "about:blank"; - }, 180); - } else { - location.href = "about:blank"; - } - }, 140); + const ret = encodeURIComponent(location.pathname + location.search); + window.location.href = `./close.html?return=${ret}`; } function applyTheme(t){ diff --git a/zuss/close.html b/zuss/close.html new file mode 100644 index 0000000..ce2064d --- /dev/null +++ b/zuss/close.html @@ -0,0 +1,47 @@ + + +
+ + + + + + +Bestätige, ob der Aushang beendet werden soll.
+