Skyscrapercity Disable Lazyload

Disables image lazy loading on skyscrapercity.com

< Feedback op Skyscrapercity Disable Lazyload

Vraag/Reactie

§
Geplaatst: 12-10-2024
Bijgewerkt: 12-10-2024

Needs a fix - image.classList.add('lazyloaded');, so pictures will be correctly placed on the screen.

(function() {
    'use strict';

    let images = document.querySelectorAll('img.bbImage.lazyload');

    [].forEach.call(images, function(image) {
        image.classList.remove('lazyload');
        image.setAttribute('src', image.getAttribute('data-src'));
        image.classList.add('lazyloaded');
    });
})();

Reactie plaatsen

Log in om antwoord te geven.