unfortunately, lazy loading is not working on iOS
This commit is contained in:
+2
-9
@@ -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>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user