1(function() { 2 var host = window.location.hostname; 3 var element = document.createElement('script'); 4 var firstScript = document.getElementsByTagName('script')[0]; 5 var url = 'https://quantcast.mgr.consensu.org' 6 .concat('/choice/', '9dW9f_xKPJfgk', '/', host, '/choice.js') 7 var uspTries = 0; 8 var uspTriesLimit = 3; 9 element.async = true; 10 element.type = 'text/javascript'; 11 element.src = url; 12 13 firstScript.parentNode.insertBefore(element, firstScript); 14 15 function makeStub() { 16 var TCF_LOCATOR_NAME = '__tcfapiLocator'; 17 var queue = []; 18 var win = window; 19 var cmpFrame; 20 21 function addFrame() { 22 var doc = win.document; 23 var otherCMP = !!(win.frames[TCF_LOCATOR_NAME]); 24 25 if (!otherCMP) { 26 if (doc.body) { 27 var iframe = doc.createElement('iframe'); 28 29 iframe.style.cssText = 'display:none'; 30 iframe.name = TCF_LOCATOR_NAME; 31 doc.body.appendChild(iframe); 32 } else { 33 setTimeout(addFrame, 5); 34 } 35 } 36 return !otherCMP; 37 } 38 39 function tcfAPIHandler() { 40 var gdprApplies; 41 var args = arguments; 42 43 if (!args.length) { 44 return queue; 45 } else if (args[0] === 'setGdprApplies') { 46 if ( 47 args.length > 3 && 48 args[2] === 2 && 49 typeof args[3] === 'boolean' 50 ) { 51 gdprApplies = args[3]; 52 if (typeof args[2] === 'function') { 53 args[2]('set', true); 54 } 55 } 56 } else if (args[0] === 'ping') { 57 var retr = { 58 gdprApplies: gdprApplies, 59 cmpLoaded: false, 60 cmpStatus: 'stub' 61 }; 62 63 if (typeof args[2] === 'function') { 64 args[2](retr); 65 } 66 } else { 67 queue.push(args); 68 } 69 } 70 71 function postMessageEventHandler(event) { 72 var msgIsString = typeof event.data === 'string'; 73 var json = {}; 74 75 try { 76 if (msgIsString) { 77 json = JSON.parse(event.data); 78 } else { 79 json = event.data; 80 } 81 } catch (ignore) {} 82 83 var payload = json.__tcfapiCall; 84 85 if (payload) { 86 window.__tcfapi( 87 payload.command, 88 payload.version, 89 function(retValue, success) { 90 var returnMsg = { 91 __tcfapiReturn: { 92 returnValue: retValue, 93 success: success, 94 callId: payload.callId 95 } 96 }; 97 if (msgIsString) { 98 returnMsg = JSON.stringify(returnMsg); 99 } 100 if (event && event.source && event.source.postMessage) { 101 event.source.postMessage(returnMsg, '*'); 102 } 103 }, 104 payload.parameter 105 ); 106 } 107 } 108 109 while (win) { 110 try { 111 if (win.frames[TCF_LOCATOR_NAME]) { 112 cmpFrame = win; 113 break; 114 } 115 } catch (ignore) {} 116 117 if (win === window.top) { 118 break; 119 } 120 win = win.parent; 121 } 122 if (!cmpFrame) { 123 addFrame(); 124 win.__tcfapi = tcfAPIHandler; 125 win.addEventListener('message', postMessageEventHandler, false); 126 } 127 }; 128 129 makeStub(); 130 131 var uspStubFunction = function() { 132 var arg = arguments; 133 if (typeof window.__uspapi !== uspStubFunction) { 134 setTimeout(function() { 135 if (typeof window.__uspapi !== 'undefined') { 136 window.__uspapi.apply(window.__uspapi, arg); 137 } 138 }, 500); 139 } 140 }; 141 142 var checkIfUspIsReady = function() { 143 uspTries++; 144 if (window.__uspapi === uspStubFunction && uspTries < uspTriesLimit) { 145 console.warn('USP is not accessible'); 146 } else { 147 clearInterval(uspInterval); 148 } 149 }; 150 151 if (typeof window.__uspapi === 'undefined') { 152 window.__uspapi = uspStubFunction; 153 var uspInterval = setInterval(checkIfUspIsReady, 6000); 154 } 155})();
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.