A Haber Haberin Sitesi
SON DAKİKA
console.log('GENERAL ANASAYFA AHABER 1'); var stCounterDic = {}; var stCounterAdd = function (myKey, myValue) { stCounterDic[myKey] = myValue; }; var stCounterGet = function (myKey) { return stCounterDic[myKey]; }; $(document).ready(function(){ $('body').on('DOMNodeInserted', function(e) { try{ var itm = e.target; if(typeof(itm)!='undefined' && typeof($(itm).attr)!='undefined' && $(itm).attr('vctrl')!=null && $(itm).attr('st')!=null){ var st = $(itm).attr('st'); if(stCounterGet(st) === undefined){ stCounterAdd(st,0); }else{ var t = stCounterGet(st); stCounterAdd(st,(t+1)); } var rnd = st.toString() + "_" + stCounterGet(st); bdAdminUrl=AdDev.FindAdminUrl(); bdSlotPath = AdDev.GenerateSlotPath(bdAdminUrl,st,false); bdAltSlotPath = AdDev.GenerateSlotPath(bdAdminUrl,st,true); if($(itm).attr('id')==null) $(itm).attr('id',rnd.toString()); if($(itm).attr('ad')==null) $(itm).attr('ad',$(itm).attr('id')); if($(itm).attr('sp')==null) $(itm).attr('sp', bdSlotPath + '/' + $(itm).attr('st')); if($(itm).attr('asp')==null) $(itm).attr('asp', bdAltSlotPath+ '/' + $(itm).attr('st')); itm.addEventListener('bdAppear', bdAppear); itm.addEventListener('bdDisappear',bdDisappear); /*bdSlots.all.push(itm);*/ AdDev.AdDevLog('AdDev', 'Added => all => ' + ($(itm).attr('ad')!=null ? ('div ad: ' + $(itm).attr('ad')):'') + ' id: ' + $(itm).attr('id') + ' added. bound is set to: ' + AdDev.CalculateThreshold(itm)); } if(typeof(itm)!='undefined' && typeof($(itm).attr)!='undefined' && $(itm).attr('lazy')!=null){ if(!bdSlots.lazy.includes(rnd)){ bdSlots.lazy.push(rnd); AdDev.AdDevLog('AdDev', ' added => lazy => ' + ($(itm).attr('ad')!=null ? ('div ad: ' + $(itm).attr('ad')):'') + ' id: ' + $(itm).attr('id') + ' added'); } } }catch(exc){ AdDev.AdDevLog('AdDev', 'Error in DOMNodeInserted event! msg: ' + exc.message ); } }); function bdAppear(e){ var itm = e.target; if(typeof(itm)!='undefined' && !bdSlots.appeareds.includes($(itm).attr('id'))){ bdSlots.appeareds.push($(itm).attr('id')); AdDev.AdDevLog('AdDev', 'Appeared => ' + ($(itm).attr('ad')!=null ? ('div ad: ' + $(itm).attr('ad')):'') + ' id: ' + $(itm).attr('id') + ' appeared!'); if(typeof($(itm).attr('lazy'))!='undefined'){ var elements = [$(itm)]; AdDev.LoadAds(elements,false); }else{ /*If house then reload ad with more visible adunit*/ //if(bdSlots.houseSlots!=undefined){ // for(i=0; i '+ ($(itm).attr('ad')!=null ? ('div ad: ' + $(itm).attr('ad')):'') + ' id: ' + $(itm).attr('id') + ' refreshing due to house ad'); // AdDev.LoadAd($(itm),true); // } // } //} } } } function bdDisappear(e){ /*nothing to do*/ } $(window).scroll(function(e){ if(bdSlots.lazy!=null && bdSlots.lazy.length>0){ for(i=0; i