Skip to content

Instantly share code, notes, and snippets.

@leMaur
Created October 20, 2018 18:52
Show Gist options
  • Select an option

  • Save leMaur/c79331a3947685e86ac67dc86602ce08 to your computer and use it in GitHub Desktop.

Select an option

Save leMaur/c79331a3947685e86ac67dc86602ce08 to your computer and use it in GitHub Desktop.
(function () {
var oldVersion = "8.17.0";
var newVersion = "10.19.0";
var b = document.getElementsByTagName('body')[0];
var s = document.createElement("script"); s.async = true;
var v = !("IntersectionObserver" in window) ? oldVersion : newVersion;
s.src = "https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/" + v + "/lazyload.min.js";
window.LL = [];
window.addEventListener('LazyLoad::Initialized', function(e){window.LL.push(e.detail.instance)},false);
window.lazyLoadOptions = [
{threshold: 100, elements_selector: ".lazy", callback_set: function(i){i.removeAttribute('data-src')}}
];
b.appendChild(s);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment