PageSourceSearch

https://www.truck1.pt/st2/_v2023/js/branding/helpers/insert_banners.module.js

js truck1.pt collected 2026-10-06 04:48:17 UTC 816 bytes, 22 lines download raw bytes

1export default function insert_banners({ path, banners, banner_type = 'image/png' }){
2    const { web, web_2x, mob, mob_2x } = banners;
3
4    const pictureBlock = document.createElement('picture');
5
6    if(Object.keys(banners).length > 0) {
7        pictureBlock.innerHTML = `
8            <source   media="(min-width: 769px)" srcset="${path}${web} 1x, ${path}${web_2x} 2x" type=${banner_type} > 
9            <source   media="(max-width: 768px)" srcset="${path}${mob} 1x, ${path}${mob_2x} 2x" type=${banner_type} > 
10            <img   src="${path}${web}"   type=${banner_type} >
11        `;
12        pictureBlock.style.width = "100%";
13
14        const image = pictureBlock.querySelector('img');
15        if(image){
16            image.style.width = '100%';
17        }
18    }
19    
20
21    return pictureBlock;
22}

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.