lets see what this does?
This commit is contained in:
12
zuss/app.js
12
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/<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");
|
||||
|
||||
@@ -169,6 +169,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="./app.js?v=2025.12.24.9"></script>
|
||||
<script src="./app.js?v=2025.12.24.10"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const CACHE = "wfw-aushang-2025.12.24.9";
|
||||
const CACHE = "wfw-aushang-2025.12.24.10";
|
||||
|
||||
const ASSETS = [
|
||||
"/zuss/",
|
||||
@@ -41,7 +41,7 @@ self.addEventListener("fetch", (event) => {
|
||||
return fresh;
|
||||
} catch {
|
||||
const cached = await caches.match(req);
|
||||
return cached || new Response('{"version":"2025.12.24.9"}', { headers: { "Content-Type": "application/json" } });
|
||||
return cached || new Response('{"version":"2025.12.24.10"}', { headers: { "Content-Type": "application/json" } });
|
||||
}
|
||||
})());
|
||||
return;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{ "version": "2025.12.24.9" }
|
||||
{ "version": "2025.12.24.10" }
|
||||
|
||||
Reference in New Issue
Block a user