Automatische Willkommensseite hinzugefügt

This commit is contained in:
Erik Thiele
2026-05-03 18:20:21 +02:00
parent 0fa3c00319
commit 1cb260fa80
12 changed files with 543 additions and 17 deletions

View File

@@ -142,6 +142,10 @@ function isImage(item) {
return item.kind === "file" && /\.(jpg|jpeg|png)$/i.test(item.name);
}
function isHtml(item) {
return item.kind === "file" && /\.(html?|htm)$/i.test(item.name);
}
function getNextItem() {
const normalizedNormal = normalFiles.map(normalizeItem);
const normalizedPrio = prioFiles.map(normalizeItem);
@@ -234,6 +238,13 @@ function playNext() {
vid.src = src;
vid.onended = playNext;
vid.play();
} else if (isHtml(item)) {
iframe.style.display = "block";
iframe.src = src;
iframe.style.width = `100vw`;
iframe.style.height = `100vh`;
iframe.style.transform = `translate(-50%, -50%)`;
setTimeout(playNext, interval);
} else {
img.style.display = "block";
img.src = src;