Sha256: 3a4675ab706869f911d893432d05fa19a846aafe085ef2b95c54ef68bd53c15f

Contents?: true

Size: 613 Bytes

Versions: 18

Compression:

Stored size: 613 Bytes

Contents

<script>
  if ('loading' in HTMLImageElement.prototype) {
    const images = document.querySelectorAll('img[loading="lazy"]');
    images.forEach(img => {
      img.src = img.dataset.src;
    });
  } else {
    // Dynamically import the LazySizes library
    const script = document.createElement('script');
    script.src = 
      'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.1.2/plugins/blur-up/ls.blur-up.min.js'
    document.body.appendChild(script);
    script.src =
      'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.1.2/lazysizes.min.js';
    document.body.appendChild(script); 
  }
</script>

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
jmblog-theme-1.3.5 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.3.4 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.3.3 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.3.2 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.3.1 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.3 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.2 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1.9 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1.8 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1.7 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1.6 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1.5 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1.4 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1.3 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1.2 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1.1 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.1 _includes/themes/jmblog-theme/components/lazyload.html
jmblog-theme-1.0 _includes/themes/jmblog-theme/components/lazyload.html