From 7fae8dc958a83b80d5f6f0113aa45a817ddb5ebd Mon Sep 17 00:00:00 2001
From: thrhymes
Date: Wed, 24 Dec 2025 21:56:38 +0100
Subject: [PATCH] lets see what this does?
---
zuss/app.js | 12 ++++++++----
zuss/index.html | 2 +-
zuss/sw.js | 4 ++--
zuss/version.json | 2 +-
4 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/zuss/app.js b/zuss/app.js
index cc4601c..d17812b 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.9";
+const APP_VERSION = "2025.12.24.10";
const TOKEN = "T9e7WESBXxy6rSD";
const BASE = "https://home.x-s.at";
const SHARE_DAV = `${BASE}/public.php/dav/files/${TOKEN}`;
@@ -258,7 +258,6 @@ function renderList(items, currentDir) {
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}`;
@@ -266,8 +265,13 @@ function renderList(items, currentDir) {
let rel = "/";
if (idx >= 0) rel = it.href.slice(idx + marker.length);
if (!rel.startsWith("/")) rel = "/" + rel;
-
- window.location.href = toPdfJsUrl(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;
+ }
});
const ico = document.createElement("div");
diff --git a/zuss/index.html b/zuss/index.html
index feecd67..69a7d08 100644
--- a/zuss/index.html
+++ b/zuss/index.html
@@ -169,6 +169,6 @@
-
+
|