diff --git a/www/data/camera/msvcamN.avif b/www/data/msvcamN.avif similarity index 100% rename from www/data/camera/msvcamN.avif rename to www/data/msvcamN.avif diff --git a/www/data/camera/msvcamS.avif b/www/data/msvcamS.avif similarity index 100% rename from www/data/camera/msvcamS.avif rename to www/data/msvcamS.avif diff --git a/www/index.html b/www/index.html index a690fe1..1eb7fde 100644 --- a/www/index.html +++ b/www/index.html @@ -23,14 +23,16 @@

Live Webcam vom Flugplatz in Moos

-
+

Blick auf die Piste

- Bild der Webcam mit Blick auf die Piste + Bild der Webcam mit Blick auf die Piste +

Hinweistext

-
+

Blick nach Süden

- Bild der Webcam mit Blick nach Süden + Bild der Webcam mit Blick nach Süden +

Hinweistext

@@ -42,7 +44,7 @@
pressewart@msv-buehl-moos.de
-

Last update: 2023/07/10

+

Last update: 2023/07/11

View code in GIT
diff --git a/www/js/webcam.js b/www/js/webcam.js index 5b7b0dc..1c10572 100644 --- a/www/js/webcam.js +++ b/www/js/webcam.js @@ -1,4 +1,4 @@ -const images = document.getElementsByClassName('current_webcam_image'); +const boxes = document.getElementsByClassName('current_webcam_image_box'); const reload_interval = setInterval(reloadImages, 60000); window.onload = function() { @@ -16,9 +16,14 @@ function checkImageSource(image_url) { function reloadImages() { console.log('reload in progress'); - Array.prototype.forEach.call(images, function(image) { + Array.prototype.forEach.call(boxes, function(box) { + var headline = box.childNodes[1] + var image = box.childNodes[3] + var status_text = box.childNodes[5] if (checkImageSource(image.src) == 200) { + status_text.style = "visibility:hidden" + image.style="width:100%;visibility:visible" if (!image.src.includes('?')) { image.src = `${image.src}?${Date.now()}`; } else { @@ -27,9 +32,12 @@ function reloadImages() { } else { console.log('unable to find image on server'); image.alt = "Webcam nicht erreichbar." + image.style="width:100%;visibility:hidden" + status_text.style = "visibility:visible" } + }); console.log('reload finished'); } \ No newline at end of file