1(function() { 2 3 var el, iframe, i, script, messageHandler, element, container, options, xdomain, 4 resize = window.IframeResize = {}, 5 id = 'iframe-4ee0adbddd0ca', 6 props = { 7 src : '', 8 width : '100%', 9 style : 'padding: 0; margin: 0; border: none; display: block; height: 0; overflow: hidden;', 10 scrolling : 'no', 11 frameBorder : 0, 12 id : id 13 }, 14 ie = navigator.userAgent.toLowerCase().indexOf('msie') > -1 && /^(9.0|10.0)/.test(navigator.userAgent), 15 16 // Sets the height of the iframe 17 setHeight = function (height) { 18 document.getElementById(id).style.height = height + 'px'; 19 }, 20 21 // Handler when window.postMessage is available 22 messageHandler = function (e) { 23 var height, r, 24 regex = new RegExp(xdomain + '$'), 25 matches = e.origin.match(regex); 26 if(matches){ 27 strD = e.data + ""; 28 r = strD.match(/^(\d+)(s?)$/); 29 if(r && r.length == 3){ 30 height = parseInt(r[1]); 31 if (!isNaN(height)) { 32 try { 33 setHeight(height); 34 } catch (ex) {} 35 } 36 if(r[2] == "s"){ 37 scroll(0,0); 38 } 39 } 40 } 41 }, 42 43 // Sets the default values then overrides 44 setProps = function (options) { 45 for (i in props) { 46 try { 47 var prop = (props[i] == options[i] || typeof(options[i]) == "undefined")? props[i] : options[i]; 48 if (i !== 'style') { 49 iframe[i] = prop; 50 } else { 51 iframe[i].cssText = prop; 52 } 53 } catch (ex) {} 54 } 55 }, 56 setup = function(options) { 57 options = options || {}; 58 xdomain = options.domain || '.*'; 59 element = options.element || 'iframe-embed'; 60 container = document.getElementById(element); 61 el = !ie ? 'iframe' : '<iframe name="' + element + '"></iframe>'; 62 iframe = document.createElement(el); 63 setProps(options); 64 }; 65 66 resize.load = function (options){ 67 setup(options); 68 if(!container) return; 69 try { 70 container.appendChild(iframe); 71 if (window.postMessage) { 72 if (window.addEventListener) { 73 window.addEventListener('message', messageHandler, false); 74 } else if (window.attachEvent) { 75 window.attachEvent('onmessage', messageHandler); 76 } 77 return true; 78 } else { 79 return false; 80 } 81 } catch (ey) {return false;} 82 } 83})();
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.