hexo/node_modules/hexo-theme-fluid/source/js/img-lazyload.js

11 lines
332 B
JavaScript
Raw Normal View History

2023-10-03 11:14:36 +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);