1(function ($) { 2 $(document).ready(function () { 3 $(".videoList span > .ContentHtml:first-child").each(function () { 4 var $this = $(this); 5 var img = $this.find("img:first").removeAttr("style"); 6 var imgWidth = parseInt($(img).width(), 10); 7 var imgHeight = parseInt($(img).height(), 10); 8 var imgRatio = imgWidth / imgHeight; 9 var imageUrl = $(img).attr("src"); 10 console.log(imgWidth); 11 console.log(imgHeight); 12 console.log(imgRatio); 13 $this.empty(); 14 15 if (imageUrl) { 16 $this.css({ 17 "background-image": "url(" + imageUrl + ")", 18 }); 19 if (imgRatio > 1.65) { 20 $this.css({ 21 "background-size": "contain", 22 "background-position": "center", 23 }); 24 } else { 25 if (imgRatio < 1.4) { 26 $this.css({ 27 "background-position": "center" 28 }); 29 } 30 } 31 } 32 }); 33 34 $("#MainHtml body").addClass("makeVisible"); 35 }); 36})(jQuery);
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.