1//Schnappschuss-Slider, IE 11 polyfill für object-fit: contain 2// Detect objectFit support 3if('objectFit' in document.documentElement.style === false) { 4 5 // assign HTMLCollection with parents of images with objectFit to variable 6 var container = document.getElementsByClassName('objectfit'); 7 8 // Loop through HTMLCollection 9 for(var i = 0; i < container.length; i++) { 10 11 // Asign image source to variable 12 var imageSource = container[i].querySelector('img').src; 13 14 // Hide image 15 container[i].querySelector('img').style.display = 'none'; 16 17 // Add background-size: cover 18 container[i].style.backgroundSize = 'contain'; 19 container[i].style.backgroundRepeat = 'no-repeat'; 20 21 // Add background-image: and put image source here 22 container[i].style.backgroundImage = 'url(' + imageSource + ')'; 23 24 // Add background-position: center center 25 container[i].style.backgroundPosition = 'center center'; 26 } 27}
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.