PageSourceSearch

https://www.alexianer-koeln.de/_assets/09516b9a083b9f52e0d5c6894cc53e6b/JavaScript/objectFit.js?1717506209

js alexianer-koeln.de collected 2026-10-02 18:02:51 UTC 986 bytes, 27 lines download raw bytes

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.