1(function(){ 2 function justifyGallery() { 3 const justify_scale = screen.height * 0.2; 4 let items = document.querySelectorAll('.photos-gallery-justify .photo-item'); 5 6 items.forEach(item => { 7 let image = item.querySelector('img'); 8 if (!image) return; 9 10 function adjustItem() { 11 let ratio = image.naturalWidth / image.naturalHeight; 12 item.style.width = justify_scale * ratio + 'px'; 13 item.style.flexGrow = ratio; 14 } 15 16 if (image.complete) { 17 adjustItem(); 18 } else { 19 image.onload = adjustItem; 20 } 21 }); 22 } 23 24 if (document.readyState === 'loading') { 25 document.addEventListener('DOMContentLoaded', justifyGallery); 26 } else { 27 justifyGallery(); 28 } 29 30 31 window.addEventListener('load', justifyGallery); 32})(); 33
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.