1 2 window.AdGlare = window.AdGlare || {q:[],run:function(){}}; 3 window.AdGlare.q.push(function(){ 4 AdGlare.setZone(483962301).load(); 5 }); 6 window.AdGlare.run(); 7 8 (function() { 9 window.AdGlare = window.AdGlare || {q:[],run:function(){}}; 10 if(!window.AdGlare.expanded) { 11 Object.assign(window.AdGlare,{ 12 expanded: true, 13 campaign_ids: {}, 14 creative_ids: {}, 15 win_id: Math.random().toString(36).slice(-5), 16 referer: '', 17 r1: (function(){ try{ return top.location.href || ''; }catch(e){}})(), 18 r2: (function(){ try{ return window.top.document.URL || ''; }catch(e){}})(), 19 r3: (function(){ try{ return (window.self !== window.top) ? document.referrer : ''; }catch(e){}})(), 20 r4: (function(){ try{ return (window.self !== window.top) ? (parent && parent.location.href) : ''; }catch(e){}})(), 21 r5: (function(){ try{ return (window.self !== window.top) ? (window.frameElement && window.frameElement.src) : ''; }catch(e){}})(), 22 r6: (function(){ try{ return window.location.href || ''; }catch(e){}})(), 23 r7: (function(){ try{ return document.location.href || ''; }catch(e){}})(), 24 setZone: function(zoneId) { 25 var obj = { 26 data: {win_id:this.win_id, referer:this.referer, capped:this.caps.get()}, 27 zoneId: zoneId, 28 adSizes: function(a){ 29 if(!Array.isArray(a)) { 30 AdGlare.warn("adSizes() for zone_id "+this.zoneId+": expecting an array. Example: ['300x250','468x60']. You added: '"+a+"'"); 31 return this; 32 } 33 for(var i=0; i<a.length; i++) { 34 if(!/^\d{1,4}x\d{1,4}$/.test(a[i])) { 35 AdGlare.warn("adSizes() for zone_id "+this.zoneId+": invalid item: '"+a[i]+"'. Example: 300x250"); 36 a.splice(i,1); 37 } 38 } 39 this.data.ad_sizes = a.join(','); 40 return this; 41 }, 42 keyWords: function(a){ 43 if(!Array.isArray(a)) { 44 AdGlare.warn("keyWords() for zone_id "+this.zoneId+": expecting an array. Example: ['cars','audi']. You added: '"+a+"'"); 45 return this; 46 } 47 for(var i=0; i<a.length; i++) { 48 a[i] = a[i].toString().replace(/[^a-zA-Z0-9_\-]/g,''); 49 } 50 this.data.keywords = a.join(','); 51 return this; 52 }, 53 keyValues: function(a){ 54 if(typeof a !== 'object') { 55 AdGlare.warn("keyValues() for zone_id "+this.zoneId+": expecting an object. Example: {'color':'red'}. You added: '"+a+"'"); 56 return this; 57 } 58 for(var key in a) { 59 var val = encodeURIComponent(a[key].toString()); 60 key = key.toString().replace(/[^a-zA-Z0-9_\-]/g,''); 61 this.data['kv_'+key] = val; 62 } 63 return this; 64 }, 65 customMacros: function(a){ 66 if(typeof a !== 'object') { 67 AdGlare.warn("customMacros() for zone_id "+this.zoneId+": expecting an object. Example: {'{color}':'red','{make}':'volkswagen'}. You added: '"+a+"'"); 68 return this; 69 } 70 for(var key in a) { 71 var val = encodeURIComponent(a[key].toString()); 72 key = key.toString().replace(/[^a-zA-Z0-9{}]/g,''); 73 if(key.substr(0,1)!='{' || key.substr(-1,1)!='}') { 74 AdGlare.warn("customMacros() for zone_id "+this.zoneId+": macro keys should be in curly brackets. Example: {'{color}':'red'}. You added: {'"+key+"':'"+a[key].toString()+"'}"); 75 return this; 76 } 77 this.data['ag_custom_'+key.substr(1,key.length-2)] = val; 78 } 79 return this; 80 }, 81 clickTrackingURL: function(a){ 82 if(typeof a !== 'string') { 83 AdGlare.warn("clickTrackingURL() for zone_id "+this.zoneId+": expecting a string containing a URL. Example: 'https://track.com/?19dj2n4'. You added: '"+a+"'"); 84 return this; 85 } 86 if(!/^(https?:\/\/)/i.test(a)) { 87 if(a!='CLICK_URL_MACRO_HERE') AdGlare.warn("clickTrackingURL() for zone_id "+this.zoneId+": invalid URL: "+a+""); 88 return this; 89 } 90 this.data.clcturl = encodeURIComponent(a.toString()); 91 return this; 92 }, 93 pageURL: function(a){ 94 a = a.toString(); 95 if(!/^(https?:\/\/)/i.test(a)) { 96 AdGlare.warn("pageURL() for zone_id "+this.zoneId+": invalid URL: "+a+""); 97 return this; 98 } 99 this.data.referer = encodeURIComponent(a); 100 return this; 101 }, 102 preferredCampaignIds: function(a){ 103 if(!Array.isArray(a)) { 104 AdGlare.warn("preferredCampaignIds() for zone_id "+this.zoneId+": expecting an array. Example: [123456789,987654321]. You added: '"+a+"'"); 105 return this; 106 } 107 for(var i=0; i<a.length; i++) a[i] = a[i].toString().replace(/[^0-9]/g,''); 108 this.data.preferred_campaign_ids = a.join(','); 109 return this; 110 }, 111 setRefresh: function(){ 112 this.data.is_refresh = 1; 113 return this; 114 }, 115 load: function() { 116 var q = ''; 117 for(var prop in this.data) { 118 var v = this.data[prop]; 119 if(!v) continue; 120 q += '&' + prop + '=' + (typeof v === 'object' ? v.join('-') : v); 121 } 122 q += (AdGlare.campaign_ids.length>0) ? '&campaign_ids='+Object.values(AdGlare.campaign_ids).join('-') : ''; 123 q += (AdGlare.creative_ids.length>0) ? '&creative_ids='+Object.values(AdGlare.creative_ids).join('-') : ''; 124 125 var page_url = ''; 126 for(var i=1; i<=7; i++) { 127 if(!AdGlare['r'+i]) continue; 128 if(AdGlare['r'+i].substring(0,4)=='http') { 129 page_url = AdGlare['r'+i]; 130 break; 131 } 132 } 133 q += '&page_url='+encodeURIComponent(page_url); 134 (function(t,r,w,d,u) { 135 var s = d.createElement(r); s.async = true; 136 s.src = u; var n = d.getElementsByTagName(r)[0]; 137 n.parentNode.insertBefore(s,n); 138 })(this,'script',window,document,'https://engine.lto.de/?'+this.zoneId+q+'&cb=' + Date.now() + Math.random()); 139 }, 140 }; 141 return obj; 142 }, 143 warn: function(m) { 144 console.warn('[AdGlare WARNING]: '+m); 145 }, 146 log: function(m,d) { 147 console.log('[AdGlare]: '+m,d||''); 148 }, 149 run: function(){ 150 while(window.AdGlare.q.length>0) { 151 var o = window.AdGlare.q.shift(); 152 if(typeof o == 'function') o(); 153 } 154 }, 155 events: { 156 timer: null, 157 q: [], 158 queue: function(url,token) { 159 this.q[url] = this.q[url] || []; 160 this.q[url].push(token); 161 if(!this.timer) this.timer = setTimeout(this.send, 5); 162 }, 163 send: function() { 164 AdGlare.events.timer = null; 165 var d = AdGlare.events.q; 166 AdGlare.events.q = []; 167 for(var url in d) { 168 if(d.hasOwnProperty(url)) { 169 var p = d[url].join('|'); 170 if(navigator.sendBeacon) { 171 if(navigator.sendBeacon(url,p) === true) continue; 172 } 173 if(window.XMLHttpRequest) { 174 var xhr = new XMLHttpRequest(); 175 xhr.open('POST',url,true); 176 xhr.send(p); 177 continue; 178 } 179 for(var data in d[url]) { 180 if(d[url].hasOwnProperty(data)) { 181 var i = document.createElement('IMG'); 182 i.style.cssText = 'width:1px;height:1px;position:fixed;opacity:0.01;left:0;bottom:0;'; 183 i.src = url + '?data=' + d[url][data]; 184 var el = document.getElementsByTagName('script')[0]; 185 el.parentNode.insertBefore(i, el); 186 } 187 } 188 } 189 } 190 } 191 }, 192 caps: { 193 now: Math.round(new Date().getTime()/1000), 194 capdata: (function(){ try{ return JSON.parse(localStorage.getItem('capd
194ata')) || {}; } catch(e){ return {}; }})(), 195 get: function() { 196 try{ 197 var capped = []; 198 for(var i in this.capdata) { 199 let a = this.capdata[i]; 200 if(!a['exp'] || this.now > parseInt(a['exp'])) delete this.capdata[i]; 201 else if(a['count'] >= a['max']) capped.push(parseInt(i.substr(1))); 202 } 203 this.capdata = Object.fromEntries(Object.entries(this.capdata).slice(-50)); 204 if(JSON.stringify(this.capdata) != JSON.stringify(JSON.parse(localStorage.getItem('capdata'))||{})) localStorage.setItem('capdata',JSON.stringify(this.capdata)); 205 return (capped.length>0) ? capped : ''; 206 } catch(e){ return ''; } 207 }, 208 set: function(campaign_id,max,exp) { 209 try{ 210 if(!exp) return; 211 let a = this.capdata['c'+campaign_id]; 212 if(a) { 213 a['max'] = max; 214 if(a['exp_original'] != exp) { 215 a['exp'] = this.now+exp; 216 a['exp_original'] = exp; 217 } 218 a['count'] += 1; 219 } else { 220 a = {'max':max,'exp':this.now+exp,'exp_original':exp,'count':1}; 221 } 222 this.capdata['c'+campaign_id] = a; 223 localStorage.setItem('capdata',JSON.stringify(this.capdata)); 224 } catch(e){} 225 } 226 }, 227 hasAbsoluteParent: function(e,max) { 228 if(!e || e === document.body || max>5) return false; 229 var p = window.getComputedStyle(e).position; 230 if(p === 'absolute' || p === 'fixed') return true; 231 return AdGlare.hasAbsoluteParent(e.parentNode,(max||0)+1); 232 }, 233 }); 234 } 235 window.AdGlare.run(); 236 })(); 237
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.