lets see what this does?

This commit is contained in:
thrhymes
2025-12-24 21:56:38 +01:00
parent 89de32ee25
commit 7fae8dc958
4 changed files with 12 additions and 8 deletions

View File

@@ -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/<token>/...; 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");