blog/themes/fluid/source/js/img-lazyload.js

11 lines
322 B
JavaScript
Raw Normal View History

2024-11-16 11:34:10 +08:00
/* global Fluid, CONFIG */
(function(window, document) {
for (const each of document.querySelectorAll('img[lazyload]')) {
Fluid.utils.waitElementVisible(each, function() {
each.removeAttribute('srcset');
each.removeAttribute('lazyload');
}, CONFIG.lazyload.offset_factor);
}
})(window, document);