PageSourceSearch

https://www.harmonyos.com/assets/js/lazyLoad.js?v=20240307

js harmonyos.com collected 2026-10-02 03:58:07 UTC 1,433 bytes, 35 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2    let lazyImages = [].slice.call(document.querySelectorAll('.lazyLoad'));
3    let active = false;
4
5    const lazyLoad = function () {
6        if (!active) {
7            active = true;
8
9            setTimeout(function () {
10                lazyImages.forEach(function (lazyImage) {
11                    if ((lazyImage.getBoundingClientRect().top <= window.innerHeight - 120 && lazyImage.getBoundingClientRect().bottom >= 0) && getComputedStyle(lazyImage).display !== 'none') {
12                        lazyImage.src = lazyImage.dataset.src;
13                        lazyImage.classList.remove('lazy');
14
15                        lazyImages = lazyImages.filter(function (image) {
16                            return image !== lazyImage;
17                        });
18
19                        if (lazyImages.length === 0) {
20                            document.removeEventListener('scroll', lazyLoad);
21                            window.removeEventListener('resize', lazyLoad);
22                            window.removeEventListener('orientationchange', lazyLoad);
23                        }
24                    }
25                });
26
27                active = false;
28            }, 200);
29        }
30    };
31    lazyLoad();
32    document.addEventListener('scroll', lazyLoad);
33    window.addEventListener('resize', lazyLoad);
34    window.addEventListener('orientationchange', lazyLoad);
35});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.