1/** 2 *@ignore 3 */ 4 5(function() { 6 function bannerViews(send_inplayer){ 7 var iframe_old = document.getElementById('banner_iframe'); 8 if (iframe_old) 9 { 10 iframe_old.parentNode.removeChild( iframe_old ); 11 } 12 13 var banners = []; 14 if (send_inplayer) 15 { 16 banners = document.getElementsByClassName("inplayer-banner-id"); 17 } 18 else 19 { 20 banners = document.getElementsByClassName("banner-id"); 21 } 22 23 var url = '/ads/prebid-ads?please_no_web_redirect=-banner-ads-js&'; 24 for (var i=0, max=banners.length; i < max; i++) { 25 url += 'banners[]=' + banners[i].getAttribute('data-id') + '&'; 26 } 27 28 url = url.substr(0, url.length - 1); 29 30 var iframe = document.createElement('iframe'); 31 iframe.src = url; 32 iframe.id = 'banner_iframe'; 33 iframe.width = 1; 34 iframe.height = 1; 35 iframe.style = 'opacity:0.1;'; 36 document.getElementsByTagName('footer')[0].appendChild(iframe); 37 } 38 39 if (typeof window.agWhenAdsAllowed === 'function') 40 { 41 window.agWhenAdsAllowed(function() { bannerViews(false); }); 42 } 43 else 44 { 45 bannerViews(false); 46 } 47 48 $(document).on('inplayer_banner:view', function() { 49 bannerViews(true); 50 }); 51})();
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.