1/* 2 * Resize remote embedded resources from ELiS Library 3 * It is JS listen of optimal height on iframe and resize iframe 4 * @author Arsen I. Borovinskiy 5 */ 6 7window.addEventListener('message',function(event){ 8 var data = event.data; 9 try { 10 if (typeof event.data === 'string') { 11 var data = JSON.parse(event.data); 12 } 13 } catch (err) { 14 15 } 16 try { 17 if (data.height != null && data.src != null) { 18 var iframe = document.querySelector("iframe[src='" + data.src + "']"); 19 if (iframe != null && iframe.src.match(event.origin)) { 20 iframe.style.height = data.height + 'px'; 21 iframe.style.maxHeight = ''; 22 iframe.style.border = 'none'; 23 } 24 } 25 } catch (err) { 26 console.error(err); 27 } 28});
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.