aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authornodiscc <nodiscc@gmail.com>2015-03-04 23:27:28 +0100
committernodiscc <nodiscc@gmail.com>2015-03-04 23:27:28 +0100
commit0e5400e6178468cd0da0b266123545db2a80f707 (patch)
treef13db75997d25db1cee52da3bd985259863e165b /index.php
parent7572cfbe9620b13569ee47337f7015bcad119332 (diff)
parent34047d23fb5e09b6bc2728f0f8827eaa038f02ea (diff)
downloadShaarli-0e5400e6178468cd0da0b266123545db2a80f707.tar.gz
Shaarli-0e5400e6178468cd0da0b266123545db2a80f707.tar.zst
Shaarli-0e5400e6178468cd0da0b266123545db2a80f707.zip
Merge pull request #132 from ArthurHoaro/picwall
Lazy load images with the light lib bLazy.js instead of jQuery
Diffstat (limited to 'index.php')
-rw-r--r--index.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/index.php b/index.php
index 99c37652..890eb581 100644
--- a/index.php
+++ b/index.php
@@ -2125,11 +2125,8 @@ function lazyThumbnail($url,$href=false)
2125 2125
2126 $html='<a href="'.htmlspecialchars($t['href']).'">'; 2126 $html='<a href="'.htmlspecialchars($t['href']).'">';
2127 2127
2128 // Lazy image (only loaded by JavaScript when in the viewport). 2128 // Lazy image
2129 if (!empty($GLOBALS['disablejquery'])) // (except if jQuery is disabled) 2129 $html.='<img class="b-lazy" src="#" data-src="'.htmlspecialchars($t['src']).'"';
2130 $html.='<img class="lazyimage" src="'.htmlspecialchars($t['src']).'"';
2131 else
2132 $html.='<img class="lazyimage" src="#" data-original="'.htmlspecialchars($t['src']).'"';
2133 2130
2134 if (!empty($t['width'])) $html.=' width="'.htmlspecialchars($t['width']).'"'; 2131 if (!empty($t['width'])) $html.=' width="'.htmlspecialchars($t['width']).'"';
2135 if (!empty($t['height'])) $html.=' height="'.htmlspecialchars($t['height']).'"'; 2132 if (!empty($t['height'])) $html.=' height="'.htmlspecialchars($t['height']).'"';