1jQuery(document).ready(function ($) { 2 3 console.log('+++Iframe resizer loaded+++'); 4 5 var src; 6 7 jQuery.fn.exists = function(){ 8 return jQuery(this).length>0; 9 } 10 11 // Iframe resizer class/listener 12 $('.iframe-resizer').on('load', function() { 13 src = $(this).attr("src"); 14 $(this)[0].contentWindow.postMessage({"iframe":$(this).attr("id"), "value":"body-outerHeight"}, 'https://www.news.uct.ac.za'); 15 }); 16 17 if($('.iframe-resizer').exists()){ 18 window.addEventListener('message', function(evt) { 19 if(evt.origin !== "https://www.news.uct.ac.za") return; 20 var iframeID = evt.data.iframe; 21 var iframeHeight = evt.data.value; 22 $("#"+iframeID).css("height", iframeHeight + 10); 23 }); 24 $(window).resize(function(){ 25 $('.iframe-resizer').each(function(){ 26 $(this)[0].contentWindow.postMessage({"iframe":$(this).attr("id"), "value":"body-outerHeight"}, 'https://www.news.uct.ac.za'); 27 }); 28 }); 29 } 30 31});
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.