diff --git a/zuss/app.js b/zuss/app.js index e1ca348..f410d0b 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.11"; +const APP_VERSION = "2025.12.24.12"; const TOKEN = "T9e7WESBXxy6rSD"; const BASE = "https://home.x-s.at"; const SHARE_DAV = `${BASE}/public.php/dav/files/${TOKEN}`; @@ -255,24 +255,17 @@ function renderList(items, currentDir) { for (const it of pdfs) { const a = document.createElement("a"); a.className = "row"; - a.href = "#"; - a.addEventListener("click", (e) => { - e.preventDefault(); - // Build relative path within share - // href includes /public.php/dav/files//...; we want path after that - const marker = `/public.php/dav/files/${TOKEN}`; - const idx = it.href.indexOf(marker); - let rel = "/"; - if (idx >= 0) rel = it.href.slice(idx + marker.length); - if (!rel.startsWith("/")) rel = "/" + rel; - const targetUrl = toPdfJsUrl(rel); - // Open in new tab so closing the PDF returns to the list, not back navigation - const win = window.open(targetUrl, "_blank", "noopener,noreferrer"); - if (!win) { - // fallback if blocked - window.location.href = targetUrl; - } - }); + + // Build relative path within share for viewer URL + const marker = `/public.php/dav/files/${TOKEN}`; + const idx = it.href.indexOf(marker); + let rel = "/"; + if (idx >= 0) rel = it.href.slice(idx + marker.length); + if (!rel.startsWith("/")) rel = "/" + rel; + const targetUrl = toPdfJsUrl(rel); + a.href = targetUrl; + a.target = "_blank"; + a.rel = "noopener noreferrer"; const ico = document.createElement("div"); ico.className = "ico"; diff --git a/zuss/close.html b/zuss/close.html deleted file mode 100644 index ce2064d..0000000 --- a/zuss/close.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - Schließen? - - - -
-

Wirklich schließen?

-

Bestätige, ob der Aushang beendet werden soll.

-
- - -
-
- - - diff --git a/zuss/index.html b/zuss/index.html index c52038b..26e6719 100644 --- a/zuss/index.html +++ b/zuss/index.html @@ -169,6 +169,6 @@ - + diff --git a/zuss/sw.js b/zuss/sw.js index 4ceeb52..a1e0f28 100644 --- a/zuss/sw.js +++ b/zuss/sw.js @@ -1,4 +1,4 @@ -const CACHE = "wfw-aushang-2025.12.24.11"; +const CACHE = "wfw-aushang-2025.12.24.12"; const ASSETS = [ "/zuss/", @@ -40,7 +40,7 @@ self.addEventListener("fetch", (event) => { return fresh; } catch { const cached = await caches.match(req); - return cached || new Response('{"version":"2025.12.24.11"}', { headers: { "Content-Type": "application/json" } }); + return cached || new Response('{"version":"2025.12.24.12"}', { headers: { "Content-Type": "application/json" } }); } })()); return; diff --git a/zuss/version.json b/zuss/version.json index cb0ce78..c0d038d 100644 --- a/zuss/version.json +++ b/zuss/version.json @@ -1 +1 @@ -{ "version": "2025.12.24.11" } +{ "version": "2025.12.24.12" }