1 2function cmGetIframeHeight(iframe) { 3 iframe.contentWindow.postMessage("getFrameHeight", "*"); 4} 5function cmOnMessage(event) { 6 if (event.data.hasOwnProperty("frameHeight")) { 7 document.getElementById("cm-popup-iframe").height = event.data.frameHeight; 8 } 9} 10function cmAddModalContent() { 11 var style = document.createElement('style'); 12 style.innerHTML = ` 13 #cm-popup-overlay { 14 opacity: 0; 15 animation-name: fadein; 16 animation-duration: 1s; 17 animation-delay: .5s; 18 animation-fill-mode: forwards; 19 } 20 #p-container { 21 position: relative; 22 width: min(545px, 90vw); 23 margin: 100px auto; 24 } 25 #cm-popup-iframe { 26 width: 100%; 27 border-radius: 4px; 28 } 29 @media only screen and (max-width: 760px) { 30 #p-container { width: 100%; margin: 0; } 31 #cm-popup-iframe { width: 100%; border-radius: 0px;} 32 } 33 @keyframes fadein { 34 from { opacity: 0; } 35 to { opacity: 1; } 36 } 37 `; 38 document.head.appendChild(style); 39 40 var o = document.createElement("div"); 41 o.innerHTML = ` 42 <div id="cm-popup-overlay" style="position:fixed; background:rgba(48, 69, 92, 0.5000); z-index:99999; height:100%; width:100%; top:0; left:0; overflow-y:auto;"> 43 <div id="p-container"> 44 <div id="cmsgpf-close-btn" 45 style="height:16px;width:16px;display:inline-block;position:absolute;cursor:pointer;top:0;right:0;margin-top:10px;margin-right:10px;"> 46 <svg viewBox="0 0 512 512" fill="#434d5d"> 47 <path 48 d="M437.5 386.6L306.9 256l130.6-130.6c14.1-14.1 14.1-36.8 0-50.9-14.1-14.1-36.8-14.1-50.9 0L256 205.1 125.4 74.5c-14.1-14.1-36.8-14.1-50.9 0-14.1 14.1-14.1 36.8 0 50.9L205.1 256 74.5 386.6c-14.1 14.1-14.1 36.8 0 50.9 14.1 14.1 36.8 14.1 50.9 0L256 306.9l130.6 130.6c14.1 14.1 36.8 14.1 50.9 0 14-14.1 14-36.9 0-50.9z" 49 fillRule="evenodd" /> 50 </svg> 51 </div> 52 <iframe id="cm-popup-iframe" onload="cmGetIframeHeight(this)" title="Email signup form" 53 src="https://confirmsubscription.com/h/i/154E728D5F728F3B/forms/6CAF0D271EBCB25D" width="545" height="935" 54 frameborder="0" marginwidth="0" margin="0" height="0" scrolling="no" allowfullscreen></iframe> 55 </div> 56 </div>`; 57 document.getElementsByTagName("body")[0].appendChild(o); 58 var c = document.getElementById("cmsgpf-close-btn"); 59 c.onclick = function () { 60 document.getElementById("cm-popup-overlay").style.display = "none" 61 window.localStorage.setItem("cmsgpf-last-closed", new Date()); 62 }; 63} 64document.addEventListener("DOMContentLoaded", function(){ 65 var t = 10000; 66 window.addEventListener('message', cmOnMessage); 67 setTimeout(() => { 68 var e = window.localStorage.getItem("cmsgpf-last-closed"); 69 var expire = new Date(e); 70 expire.setSeconds(expire.getSeconds() + 31536000); 71 if (isNaN(expire) || new Date() > expire) { 72 cmAddModalContent(); 73 } 74 }, t); 75});
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.