1(function () { 2 const comscoreClientId = document.currentScript.getAttribute("data-comscore-client-id"); 3 let comscoreTriggered = false; 4 5 const checkGdpr = (tcData) => { 6 for (const [key, value] of Object.entries(tcData)) { 7 if (value) return "1"; 8 } 9 return "0"; 10 }; 11 12 const updateComscore = (gdpr) => { 13 if (!comscoreTriggered) { 14 window._comscore = window._comscore || []; 15 window._comscore.push({ 16 c1: "2", 17 c2: comscoreClientId, 18 cs_ucfr: gdpr, 19 options: { enableFirstPartyCookie: true } 20 }); 21 (function() { 22 var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true; 23 s.src=`https://sb.scorecardresearch.com/cs/${comscoreClientId}/beacon.js`; 24 s.setAttribute("data-testid", "beacon-script"); 25 el.parentNode.insertBefore(s, el); 26 })(); 27 comscoreTriggered = true; 28 } 29 }; 30 31 const callback = (tcData, success) => { 32 if(success && tcData.eventStatus === 'tcloaded') { 33 __tcfapi('removeEventListener', 2, (success) => { 34 if(success) { 35 updateComscore(checkGdpr(tcData.purpose.consents)); 36 } 37 }, tcData.listenerId); 38 } else { 39 updateComscore(""); 40 } 41 } 42 43 if (window.__tcfapi) { 44 __tcfapi('addEventListener', 2, callback); 45 } else { 46 callback(); 47 } 48})();
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.