A live bird collage card for your Home Assistant dashboard.
unfortunately, lazy loading is not working on iOS
mcguirepr8939a0ba56972c
diff --git a/scripts/play.php b/scripts/play.phpindex b458b323..3cd367f1 100644--- a/scripts/play.php+++ b/scripts/play.php@@ -121,7 +121,6 @@ if(isset($_GET['bydate'])){session_unset();$view = "choose";}-$lazyload = "";?><html>@@ -133,12 +132,6 @@ $lazyload = "";</head><script>-window.onload = function(){- if(!window.navigator.userAgent.includes("iPhone") && !window.navigator.userAgent.includes("Mac")) {- <?php $lazyload = "loading=\"lazy\""; ?>- }-};-function toggleLock(filename, type, elem) {const xhttp = new XMLHttpRequest();xhttp.onload = function() {@@ -305,13 +298,13 @@ if(isset($_GET['species'])){ ?>echo "<tr><td class='relative'>$date $time<br>$confidence<br><img style='cursor:pointer' onclick='toggleLock(\"".$filename_formatted."\",\"".$type."\", this)' class=\"copyimage\" width=25 title=\"".$title."\" src=\"".$imageicon."\">- <a href=\"$filename\"><img ".$lazyload." src=\"$filename.png\"></a>+ <a href=\"$filename\"><img src=\"$filename.png\"></a></td></tr>";} else {echo "<tr><td class='relative'>$date $time<br>$confidence<br>- <a href=\"$filename\"><img ".$lazyload." src=\"$filename.png\"></a>+ <a href=\"$filename\"><img src=\"$filename.png\"></a></td></tr>";}