1var elem = document.createElement('script'); 2elem.src = 'https://quantcast.mgr.consensu.org/cmp.js'; 3elem.async = true; 4elem.type = "text/javascript"; 5var scpt = document.getElementsByTagName('script')[0]; 6scpt.parentNode.insertBefore(elem, scpt); 7 8(function() { 9 var gdprAppliesGlobally = true; 10 function addFrame() { 11 if (!window.frames['__cmpLocator']) { 12 if (document.body) { 13 var body = document.body, 14 iframe = document.createElement('iframe'); 15 iframe.style = 'display:none'; 16 iframe.name = '__cmpLocator'; 17 body.appendChild(iframe); 18 } else { 19 // In the case where this stub is located in the head, 20 // this allows us to inject the iframe more quickly than 21 // relying on DOMContentLoaded or other events. 22 setTimeout(addFrame, 5); 23 } 24 } 25 } 26 27 addFrame(); 28 29 function cmpMsgHandler(event) { 30 var msgIsString = typeof event.data === "string"; 31 var json; 32 if(msgIsString) { 33 json = event.data.indexOf("__cmpCall") != -1 ? JSON.parse(event.data) : {}; 34 } else { 35 json = event.data; 36 } 37 38 if (json.__cmpCall) { 39 var i = json.__cmpCall; 40 window.__cmp(i.command, i.parameter, function(retValue, success) { 41 var returnMsg = {"__cmpReturn": { 42 "returnValue": retValue, 43 "success": success, 44 "callId": i.callId 45 }}; 46 event.source.postMessage(msgIsString ? 47 JSON.stringify(returnMsg) : returnMsg, '*'); 48 }); 49 } 50 } 51 52 window.__cmp = function (c) { 53 var b = arguments; 54 if (!b.length) { 55 return __cmp.a; 56 } 57 else if (b[0] === 'ping') { 58 b[2]({"gdprAppliesGlobally": gdprAppliesGlobally, 59 "cmpLoaded": false}, true); 60 } else if (c == '__cmp') 61 return false; 62 else { 63 if (typeof __cmp.a === 'undefined') { 64 __cmp.a = []; 65 } 66 __cmp.a.push([].slice.apply(b)); 67 } 68 } 69 window.__cmp.gdprAppliesGlobally = gdprAppliesGlobally; 70 window.__cmp.msgHandler = cmpMsgHandler; 71 72 if (window.addEventListener) { 73 window.addEventListener('message', cmpMsgHandler, false); 74 } 75 else { 76 window.attachEvent('onmessage', cmpMsgHandler); 77 } 78 79})(); 80 81window.__cmp('init', JSON.parse( qc_choice_init ) );
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.