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/', '6Fv0cGNfc_bw8', '/', 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 event.source.postMessage(returnMsg, '*'); 101 }, 102 payload.parameter 103 ); 104 } 105 } 106 107 while (win) { 108 try { 109 if (win.frames[TCF_LOCATOR_NAME]) { 110 cmpFrame = win; 111 break; 112 } 113 } catch (ignore) {} 114 115 if (win === window.top) { 116 break; 117 } 118 win = win.parent; 119 } 120 if (!cmpFrame) { 121 addFrame(); 122 win.__tcfapi = tcfAPIHandler; 123 win.addEventListener('message', postMessageEventHandler, false); 124 } 125 }; 126 127 if (typeof module !== 'undefined') { 128 module.exports = makeStub; 129 } else { 130 makeStub(); 131 } 132 133 var uspStubFunction = function() { 134 var arg = arguments; 135 if (typeof window.__uspapi !== uspStubFunction) { 136 setTimeout(function() { 137 if (typeof window.__uspapi !== 'undefined') { 138 window.__uspapi.apply(window.__uspapi, arg); 139 } 140 }, 500); 141 } 142 }; 143 144 var checkIfUspIsReady = function() { 145 uspTries++; 146 if (window.__uspapi === uspStubFunction && uspTries < uspTriesLimit) { 147 console.warn('USP is not accessible'); 148 } else { 149 clearInterval(uspInterval); 150 } 151 }; 152 153 if (typeof window.__uspapi === 'undefined') { 154 window.__uspapi = uspStubFunction; 155 var uspInterval = setInterval(checkIfUspIsReady, 6000); 156 } 157})();
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.