[10.0.024.dev] lazy loading

This commit is contained in:
fredtempez 2020-01-07 10:15:16 +01:00
parent a06218bdaf
commit 5cd2d71ea3
4 changed files with 7 additions and 7 deletions

View File

@ -399,6 +399,11 @@ $(document).ready(function(){
$("#navfixedconnected .navLevel2").css({ 'pointer-events' : 'none' });
});
/**
* Chargement paresseux des images et des iframes
*/
$("img,picture,iframe").attr("loading","lazy");
/**
* Effet accordéon
*/

View File

@ -34,7 +34,7 @@ class common {
const TEMP_DIR = 'site/tmp/';
// Numéro de version
const ZWII_VERSION = '10.0.023.dev';
const ZWII_VERSION = '10.0.024.dev';
public static $actions = [];
public static $coreModuleIds = [
@ -99,8 +99,7 @@ class common {
'tippy',
'zwiico',
'imagemap',
'simplelightbox',
'lazysimon'
'simplelightbox'
],
'view' => ''
];

View File

@ -1,3 +0,0 @@
[
"lazy_simon.min.js"
]

View File

@ -1 +0,0 @@
for(o=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.src=e.target.dataset.l,t.unobserve(e.target))})}),d=document.querySelectorAll("img"),i=d.length-1;i>=0;i--)e=d[i],e.dataset.l=e.src,e.src="data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22/%3E",o.observe(e);