Saltar menú de navegación Teclas de acceso rápido

Intendente

Teclas de acceso

"; setInnerHTML(document.getElementById(zoneID), bannerHTML); // Callback if ( bannerZonas[zoneID][bannerScreen].callback != '') { functionName = bannerZonas[zoneID][bannerScreen].callback; window[functionName](); } } else { // No banners in zoneID but emptyBanner is ok if ( bannerZonas[zoneID][bannerScreen].empty_banner != '' ) { // console.log('empty_banner',bannerZonas[zoneID][bannerScreen].empty_banner); $("#" + zoneID).attr('data-zone-id', bannerZonaID).closest('.'+bannerClassHide).removeClass(bannerClassHide); bannerHTML = atob(bannerZonas[zoneID][bannerScreen].empty_banner); setInnerHTML(document.getElementById(zoneID), bannerHTML); } } } } renderBannerTime = Date.now() - renderBannerTime; console.log('> banner render:' + renderBannerTime + ' ms'); if (window.googletag && googletag.apiReady) { console.log("> GoogleTag Ready #2"); } // Contabiliza impresiones if (bannersID != '') { $.ajax({ "method": "post", "url": "/extras/publicidad.php", "dataType": "json", "data": {id: bannersID} }); } } // Contabiliza clicks $("[data-banner-id]").click(function() { bannerID = $(this).attr("data-banner-id"); $.ajax({ "method": "post", "url": "/extras/publicidad.php?click=true", "dataType": "json", "data": {id: bannerID} }); return true; }); const searchParams = new URLSearchParams(window.location.search.substring(1)); var bannerURL = '/publicidad.json?t=' + Math.random().toString() + '&' + window.location.search.substring(1); testTimeToRender = Date.now() - testTimeToRender; console.log('> time to render:' + testTimeToRender + 'ms'); $.get(bannerURL, {}).done(function(data) { bannerZonas = data.zonas; bannerData = data.banners; bannerNexos = data.nexo; if (Object.keys(bannerData).length >= 1) { renderBanners(true); } if ( data.dfp !== undefined && ( data.dfp == "zone" || data.dfp == "createzone" ) ) { for ( var zoneID in bannerZonas ) { if ( $("#" + zoneID).length ) { $("#" + zoneID).closest('.'+bannerClass).removeClass(bannerClassHide).addClass('banner-dfp'); if ( bannerZonas[zoneID][bannerScreen] !== undefined ) { bannerZonaData = bannerZonas[zoneID][bannerScreen]; } else { for ( var bannerScreenAvailable in bannerZonas[zoneID] ) { bannerZonaData = bannerZonas[zoneID][bannerScreenAvailable]; } } bannerZonaHTML = '' + bannerZonaData.nombre + '
'; for ( var bannerScreenAvailable in bannerZonas[zoneID] ) { bannerZonaDataInViewport = bannerScreenAvailable; bannerZonaData = bannerZonas[zoneID][bannerScreenAvailable]; bannerZonaHTML+= '

'; if (bannerZonaDataInViewport == 'd') { bannerZonaHTML+= 'Medidas Escritorio:
'; } else if (bannerZonaDataInViewport == 't') { bannerZonaHTML+= 'Medidas Tablet:
'; } else if (bannerZonaDataInViewport == 'm') { bannerZonaHTML+= 'Medidas Celular:
'; } bannerZonaHTML+= '- Ancho: '; if (bannerZonaData.ancho_min != bannerZonaData.ancho_max) { bannerZonaHTML+= 'de ' + bannerZonaData.ancho_min + 'px a '; } bannerZonaHTML+= bannerZonaData.ancho_max + 'px
'; bannerZonaHTML+= '- Alto: '; if (bannerZonaData.alto_min != bannerZonaData.alto_max) { bannerZonaHTML+= 'de ' + bannerZonaData.alto_min + 'px a '; } bannerZonaHTML+= bannerZonaData.alto_max + 'px'; } $("#" + zoneID).width( bannerZonas[zoneID][bannerScreen].ancho_max + 'px'); $("#" + zoneID).height(bannerZonas[zoneID][bannerScreen].alto_max + 'px'); $("#" + zoneID).css('backgroundColor','#990000'); $("#" + zoneID).css('max-height','350px'); // previene $("#" + zoneID).html('' + bannerZonaHTML + ''); } } } if ( data.dfp !== undefined && data.dfp == "createzone" ) { $("." + bannerClass).each(function() { id = $(this).find("div").attr("id"); $(this).attr("data-block-id", id); }); $("." + bannerClass).each(function() { if ( !$(this).hasClass('banner-dfp') ) { $(this).removeClass(bannerClassHide); id = $(this).find("div").attr("id"); color = '#009900'; if ( $('#' + id).length > 1 ) { color = '#e5ca0a'; } bannerZonaHTML = '#' + id + '
'; $("#" + id).width('100%'); $("#" + id).css('backgroundColor',color); $("#" + id).html('' + bannerZonaHTML + ''); $("#" + id).attr("id", id + '-dfp'); // prevent refresh } // Resalta los duplicados. testID = $(this).attr("data-block-id"); if ( $("." + bannerClass + "[data-block-id='" + testID + "']").length > 1 ) { $("." + bannerClass + "[data-block-id='" + testID + "']").find("div").css('backgroundColor','#e5ca0a'); } }); } }).catch(function(error) { }); if (bannerRefresh > 1) { setInterval(function(){ renderBanners(false); }, bannerRefresh); } -->