PageSourceSearch

https://www.tauron-wytwarzanie.pl/assets/scripts/modules/removeLazy.js

js tauron-wytwarzanie.pl collected 2026-10-04 13:36:39 UTC 1,462 bytes, 39 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2    const bgElements = document.querySelectorAll('.removeLazy');
3
4    function updateBackgrounds() {
5        const screenWidth = window.innerWidth;
6
7        bgElements.forEach(bgElement => {
8            if (!bgElement) return;
9
10            const bgset = bgElement.getAttribute('data-bgset');
11            if (!bgset) return;
12
13            let newBg = '';
14
15            if (screenWidth <= 767) {
16                // Match content before [(max-width: 767px)]
17                const mobileMatch = bgset.match(/([^|]+)(?=\s*\[\(max-width:\s*767px\)\])/);
18                newBg = mobileMatch ? mobileMatch[1].trim() : '';
19            } else if (screenWidth <= 1199) {
20                // Match content before [(max-width: 1199px)]
21                const tabletMatch = bgset.match(/([^|]+)(?=\s*\[\(max-width:\s*1199px\)\])/);
22                newBg = tabletMatch ? tabletMatch[1].trim() : '';
23            } else {
24                // Get the last URL in the bgset (desktop)
25                const parts = bgset.split('|');
26                newBg = parts[parts.length - 1].trim();
27            }
28
29            if (newBg) {
30                bgElement.style.backgroundImage = `url(${newBg})`;
31            }
32        });
33    }
34
35    // Set initial backgrounds
36    updateBackgrounds();
37    // Update backgrounds on window resize
38    window.addEventListener('resize', updateBackgrounds);
39});

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.