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()
|
* - Install/Update Overlay mit beforeinstallprompt.prompt()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const APP_VERSION = "2025.12.24.9";
|
const APP_VERSION = "2025.12.24.10";
|
||||||
const TOKEN = "T9e7WESBXxy6rSD";
|
const TOKEN = "T9e7WESBXxy6rSD";
|
||||||
const BASE = "https://home.x-s.at";
|
const BASE = "https://home.x-s.at";
|
||||||
const SHARE_DAV = `${BASE}/public.php/dav/files/${TOKEN}`;
|
const SHARE_DAV = `${BASE}/public.php/dav/files/${TOKEN}`;
|
||||||
@@ -258,7 +258,6 @@ function renderList(items, currentDir) {
|
|||||||
a.href = "#";
|
a.href = "#";
|
||||||
a.addEventListener("click", (e) => {
|
a.addEventListener("click", (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
// Build relative path within share
|
// Build relative path within share
|
||||||
// href includes /public.php/dav/files/<token>/...; we want path after that
|
// href includes /public.php/dav/files/<token>/...; we want path after that
|
||||||
const marker = `/public.php/dav/files/${TOKEN}`;
|
const marker = `/public.php/dav/files/${TOKEN}`;
|
||||||
@@ -266,8 +265,13 @@ function renderList(items, currentDir) {
|
|||||||
let rel = "/";
|
let rel = "/";
|
||||||
if (idx >= 0) rel = it.href.slice(idx + marker.length);
|
if (idx >= 0) rel = it.href.slice(idx + marker.length);
|
||||||
if (!rel.startsWith("/")) rel = "/" + rel;
|
if (!rel.startsWith("/")) rel = "/" + rel;
|
||||||
|
const targetUrl = toPdfJsUrl(rel);
|
||||||
window.location.href = 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");
|
const ico = document.createElement("div");
|
||||||
|
|||||||
@@ -169,6 +169,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="./app.js?v=2025.12.24.9"></script>
|
<script src="./app.js?v=2025.12.24.10"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const CACHE = "wfw-aushang-2025.12.24.9";
|
const CACHE = "wfw-aushang-2025.12.24.10";
|
||||||
|
|
||||||
const ASSETS = [
|
const ASSETS = [
|
||||||
"/zuss/",
|
"/zuss/",
|
||||||
@@ -41,7 +41,7 @@ self.addEventListener("fetch", (event) => {
|
|||||||
return fresh;
|
return fresh;
|
||||||
} catch {
|
} catch {
|
||||||
const cached = await caches.match(req);
|
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;
|
return;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{ "version": "2025.12.24.9" }
|
{ "version": "2025.12.24.10" }
|
||||||
|
|||||||
Reference in New Issue
Block a user