]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
Lazy load images with the light lib bLazy.js instead of jQuery:
[github/shaarli/Shaarli.git] / index.php
index 99c37652c78b82be53097f98e0bce2ff1152dddd..890eb581de6acfd6a26a2e218327e03409cf4ac6 100644 (file)
--- a/index.php
+++ b/index.php
@@ -2125,11 +2125,8 @@ function lazyThumbnail($url,$href=false)
 
     $html='<a href="'.htmlspecialchars($t['href']).'">';
 
-    // Lazy image (only loaded by JavaScript when in the viewport).
-    if (!empty($GLOBALS['disablejquery'])) // (except if jQuery is disabled)
-        $html.='<img class="lazyimage" src="'.htmlspecialchars($t['src']).'"';
-    else
-        $html.='<img class="lazyimage" src="#" data-original="'.htmlspecialchars($t['src']).'"';
+    // Lazy image
+    $html.='<img class="b-lazy" src="#" data-src="'.htmlspecialchars($t['src']).'"';
 
     if (!empty($t['width']))  $html.=' width="'.htmlspecialchars($t['width']).'"';
     if (!empty($t['height'])) $html.=' height="'.htmlspecialchars($t['height']).'"';