1// Version: 2.2.2 2// Description: Incogni Data Exposure Scanner Widget. 3(function () { 4 const scannerStyling = `div[data-type="scanner"], div[data-type="banner"] { 5 position: relative; 6 width: 100%; 7 box-sizing: border-box; 8 container-type: inline-size; 9 } 10 11 /* Extra small devices (phones, 320px and down) */ 12 @container (max-width: 320px) { 13 div[data-type="scanner"] iframe { min-height: 675px; } 14 div[data-type="banner"] iframe { min-height: 375px; } 15 16 /* Branded */ 17 div[data-branded="true"][data-type="scanner"] iframe { min-height: 705px; } 18 div[data-branded="true"][data-type="banner"] iframe { min-height: 408px; } 19 } 20 21 /* Small devices (large phones, 321px to 375px) */ 22 @container (min-width: 321px) and (max-width: 375px) { 23 div[data-type="scanner"] iframe { min-height: 630px; } 24 div[data-type="banner"] iframe { min-height: 365px; } 25 26 /* Branded */ 27 div[data-branded="true"][data-type="scanner"] iframe { min-height: 660px; } 28 div[data-branded="true"][data-type="banner"] iframe { min-height: 395px; } 29 } 30 31 /* Medium phones (376px to 414px) */ 32 @container (min-width: 376px) and (max-width: 414px) { 33 div[data-type="scanner"] iframe { min-height: 600px; } 34 div[data-type="banner"] iframe { min-height: 355px; } 35 36 /* Branded */ 37 div[data-branded="true"][data-type="scanner"] iframe { min-height: 630px; } 38 div[data-branded="true"][data-type="banner"] iframe { min-height: 385px; } 39 } 40 41 /* Large phones (415px to 480px) */ 42 @container (min-width: 415px) and (max-width: 480px) { 43 div[data-type="scanner"] iframe { min-height: 585px; } 44 div[data-type="banner"] iframe { min-height: 325px; } 45 46 /* Branded */ 47 div[data-branded="true"][data-type="scanner"] iframe { min-height: 615px; } 48 div[data-branded="true"][data-type="banner"] iframe { min-height: 355px; } 49 } 50 51 /* Small tablets (481px to 560px) */ 52 @container (min-width: 481px) and (max-width: 560px) { 53 div[data-type="scanner"] iframe { min-height: 565px; } 54 div[data-type="banner"] iframe { min-height: 300px; } 55 56 /* Branded */ 57 div[data-branded="true"][data-type="scanner"] iframe { min-height: 595px; } 58 div[data-branded="true"][data-type="banner"] iframe { min-height: 333px; } 59 } 60 61 /* Medium tablets (561px to 640px) */ 62 @container (min-width: 561px) and (max-width: 640px) { 63 div[data-type="scanner"] iframe { min-height: 520px; } 64 div[data-type="banner"] iframe { min-height: 285px; } 65 66 /* Branded */ 67 div[data-branded="true"][data-type="scanner"] iframe { min-height: 550px; } 68 div[data-branded="true"][data-type="banner"] iframe { min-height: 315px; } 69 } 70 71 /* Large tablets (641px to 770px) */ 72 @container (min-width: 641px) and (max-width: 770px) { 73 div[data-type="scanner"] iframe { min-height: 470px; } 74 div[data-type="banner"] iframe { min-height: 265px; } 75 76 /* Branded */ 77 div[data-branded="true"][data-type="scanner"] iframe { min-height: 515px; } 78 div[data-branded="true"][data-type="banner"] iframe { min-height: 295px; } 79 } 80 81 /* Small desktops (771px to 1023px) */ 82 @container (min-width: 771px) and (max-width: 1023px) { 83 div[data-type="scanner"] iframe { min-height: 350px; } 84 div[data-type="banner"] iframe { min-height: 255px; } 85 86 /* Branded */ 87 div[data-branded="true"][data-type="scanner"] iframe { min-height: 395px; } 88 div[data-branded="true"][data-type="banner"] iframe { min-height: 285px; } 89 } 90 91 /* Medium desktops (1024px to 1359px) */ 92 @container (min-width: 1024px) and (max-width: 1359px) { 93 div[data-type="scanner"] iframe { min-height: 335px; } 94 div[data-type="banner"] iframe { min-height: 255px; } 95 96 /* Branded */ 97 div[data-branded="true"][data-type="scanner"] iframe { min-height: 370px; } 98 div[data-branded="true"][data-type="banner"] iframe { min-height: 285px; } 99 } 100 101 /* Large desktops (1360px and up) */ 102 @container (min-width: 1360px) { 103 div[data-type="scanner"] iframe { min-height: 335px; } 104 div[data-type="banner"] iframe { min-height: 255px; } 105 106 /* Branded */ 107 div[data-branded="true"][data-type="scanner"] iframe { min-height: 380px; } 108 div[data-branded="true"][data-type="banner"] iframe { min-height: 285px; } 109 }`; 110 try { 111 const currentTarget = document.currentScript.parentElement; 112 const dataSource = currentTarget.getAttribute("data-source"); 113 const isBranded = currentTarget.getAttribute("data-branded"); 114 const currentType = currentTarget.getAttribute("data-type"); 115 const reportCta = currentTarget.getAttribute("data-email"); 116 117 const widgetUrl = new URL(currentType || "banner", "https://incogni.com"); 118 widgetUrl.searchParams.set("partner_url", encodeURIComponent(dataSource)); 119 widgetUrl.searchParams.set("branded", isBranded || "false"); 120 121 if (reportCta) { 122 widgetUrl.searchParams.set("report_cta", encodeURIComponent(reportCta)); 123 } 124 widgetUrl.searchParams.set( 125 "iframe_hostname", 126 encodeURIComponent(window.location.hostname) 127 ); 128 widgetUrl.searchParams.set( 129 "iframe_pathname", 130 encodeURIComponent(window.location.pathname) 131 ); 132 133 const createStyles = () => { 134 const styleElement = currentTarget.getElementsByTagName("style"); 135 if (styleElement && styleElement.length) return; 136 const styleTag = document.createElement("style"); 137 styleTag.textContent = scannerStyling; 138 currentTarget.insertAdjacentElement("afterbegin", styleTag); 139 }; 140 const createIFrame = () => { 141 const iFrameElement = currentTarget.getElementsByTagName("iframe"); 142 if (iFrameElement && iFrameElement.length) return; 143 const iFrameTag = document.createElement("iframe"); 144 iFrameTag.setAttribute("src", widgetUrl); 145 iFrameTag.setAttribute("style", "width: 100%;"); 146 iFrameTag.setAttribute("frameborder", "0"); 147 iFrameTag.setAttribute("data-branded", isBranded); 148 currentTarget.insertAdjacentElement("beforeend", iFrameTag); 149 }; 150 createStyles(); 151 createIFrame(); 152 } catch (error) { 153 console.log(error.message); 154 console.log(`Initiation error: verify data-source with Incogni partner`); 155 } 156})();
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.