Irán anunció el fin de sus ataques contra Israel, pero responderá si vuelve a bombardear Líbano
Teherán dio por terminadas las operaciones lanzadas durante el fin de semana y justificó su ofensiva por las casi 3.500 presuntas violaciones
El titular del ejecutivo, Rogelio Frigerio, visitó este domingo la localidad de San José, departamento Colón. Allí inauguró la obra de ampliación del hospital que fue ejecutada con fondos de la Comisión Administradora para el Fondo Especial de Salto Grande (Cafesg) y demandó una inversión superior a los 400 millones de pesos.
En la oportunidad, el mandatario felicitó a la Cafesg, a la empresa y a las autoridades del hospital “por la calidad de la obra y la rapidez”.
Recordó en la instancia que había visitado el lugar meses atrás, cuando la obra aún no estaba iniciada, y señaló que “hoy está terminada con una gran calidad”. “Además de la rampa, que era una necesidad imperiosa de muchos años del hospital, tiene un anexo nuevo para kinesiología, laboratorio, pediatría y vacunatorio”, describió, y remarcó que son “lugares fundamentales para el hospital”, que el director venía solicitando desde hace tiempo.
En esa línea, destacó la importancia de la obra para la localidad de San José, y aseguró que “estamos usando los recursos de Cafesg, priorizando la salud y la educación como corresponde”. Además, adelantó que en la oportunidad avanzaron en otro proyecto vinculado al sector de guardia. “Es una necesidad que tiene el hospital desde hace muchísimo tiempo”, reconoció Frigerio.
Estuvo acompañado por el ministro de Salud, Daniel Blanzaco; el secretario de Salud, Daniel Valentinuz; el vocal de la Cafesg, Pablo Canali; el director general de Hospitales, Mauro González; y el director del nosocomio, Marcelo Ramat.
Por su parte, Daniel Blanzaco, agradeció a la Cafesg porque el proyecto se pudo concretar rápidamente. En ese sentido, explicó que el Ministerio intervino en la parte eléctrica: “Se hizo toda la parte eléctrica nueva y estamos prontos a instalar un generador”, indicó. También informó que se incorporó un monitor multiparamétrico y una mochila de oxígeno completa.
Asimismo, el ministro recordó que uno de los ejes de la gestión “es la reestructuración edilicia de los hospitales, sobre todo de estos establecimientos más añosos que precisan una puesta en valor y adecuación para los tiempos que corren”. “Para la comunidad de San José es muy importante poder abrir este lugar hoy”, expresó, y adelantó que trabajan en los arreglos del servicio de Guardia.
En tanto, el director del hospital agradeció a todo el equipo de la Gobernación “porque nos escuchó”, y agregó: “Si nos escuchan podemos dar respuesta a la comunidad. Hoy el sanjosino tiene que estar de fiesta porque esta obra hizo que el hospital sea otro: es un hospital de referencia en la región por el servicio, la calidad y por la infraestructura que está teniendo”, afirmó.
Sobre la obra
La ampliación ejecutada por Cafesg comprende la construcción de un sector anexo de aproximadamente 150 metros cuadrados, donde funcionarán las áreas de vacunación, sala de extracción, laboratorio y kinesiología, con su correspondiente recepción, sala de espera y sanitarios. También se realizó una rampa de acceso para personas con dificultad motora.
Además, el Ministerio de Salud, llevó adelante el reemplazo del cableado, nuevo pilar, se colocaron cajas de distribución y se realizó el tendido de internet/cable. Las mejoras alcanzan diferentes áreas. También se realizaron refacciones en la Sala Polivalente B, pasillos, Sala de Maternidad y habitaciones.
let zonasNoticiasLoaded = 0;
const zonas_noticias = document.querySelectorAll('.adserver-zonas-noticias');
const divContenido = document.querySelector('.noticia-contenido'); const iframes = divContenido.querySelectorAll('iframe'); for (var i = 0; i < iframes.length; i++) { iframes[i].style.display = 'block'; iframes[i].style.margin = '0 auto'; } window.addEventListener('load', () => { noticiasRelacionadas(); loadBannersNoticias(); }); document.querySelectorAll('.videodatasrc').forEach(function(element) { element.parentNode.addEventListener('click', function() { var parentElement = element.parentNode; loadVideo(parentElement); }); });
function noticiasRelacionadas() {
var noticiasRelacionadasElements = document.querySelectorAll('.noticia-relacionada');
noticiasRelacionadasElements.forEach(function (element, index) { var noticias_id = element.getAttribute('data-id'); var url = apiURL + 'noticias/' + noticias_id + '/relacionadas'; var obj = element;
fetch(url) .then(function (response) { return response.text(); }) .then(function (html) { obj.innerHTML = html; }) .catch(function (error) {
}); }); }
function loadVideo(element){
let imgElement = element.querySelector('.videodatasrc'); let dataSrc = imgElement.dataset.url;
if(dataSrc){ var height = element.clientHeight; element.innerHTML = '
this.removeEventListener('click', arguments.callee); }
function loadBannersNoticias(){
try {
const zona_banners_noticias_raw = "%7B%22configuracion%22%3A%7B%22zonas_por_parrafo%22%3A%221%22%2C%22zonas_cada_parrafos%22%3A%224%22%2C%22modo_distribucion%22%3A%221%22%7D%2C%22zonas_banners%22%3Anull%7D"; const zona_banners_noticias = JSON.parse(decodeURIComponent(zona_banners_noticias_raw)); let configuracion = zona_banners_noticias?.configuracion; let zonas = zona_banners_noticias?.zonas_banners;
let i = 0; let zonaIndex = 0;
while (i < zonas_noticias.length) { if (zonas_noticias[i].classList.contains("bannerLoaded")) { /* Banner ya cargado */ }else{ /* Banner NO cargado */ zonas_noticias[i].classList.add("bannerLoaded"); for(let z = 0; z < configuracion.zonas_por_parrafo; z++){ var zona = zonas.shift(); if(zona){ renderBannerNoticia(i,zona); }else{ break; } } if(!zona){ break; } } i += parseInt(configuracion.zonas_cada_parrafos); } } catch (error) { } zonasNoticiasLoaded++; } function renderBannerNoticia(i,zona){ let data = null; if(zona.adserver_externo){ var scriptContent = zona.codigo; postscribe(zonas_noticias[i], scriptContent); }else{ if(zona.zonas_tipos == '2'){ data = zona.banners[Math.floor(Math.random() * zona.banners.length)]; }else{ data = zona.banners[0]; } let src = null; switch (data.banners_versiones_id) { case "1": // Compartido src = data.image; height = data.alto; width = data.ancho; break; case "2": // Diferenciada src = isMobile ? data.image_mobile : data.image; height = isMobile ? data.alto_mobile : data.alto; width = isMobile ? data.ancho_mobile : data.ancho; break; case "3": // Solo desktop src = isMobile ? null : data.image; height = isMobile ? null : data.alto; width = isMobile ? null : data.ancho; break; case "4": // Solo mobile src = isMobile ? data.image_mobile : null; height = isMobile ? data.alto_mobile : null; width = isMobile ? data.ancho_mobile : null; break; default: break; } if(src){ /**** Tracking Analytics ****/ // Banner trackImpresion({ event_category: BANNER_DEFAULT_EVENT_CATEGORY, event_label: `${BANNER_NOMBRE} | ${data.denominacion} | ${data.banners_id}` }); // Zona //trackImpresion({ event_category: `${ZONA_BANNER_NOMBRE} | ${data.zona} | ${data.zonas_id}`, event_label: `${data.denominacion} | ${data.banners_id}` }); // Tracking de click zonas_noticias[i].addEventListener('click', function () { // banner trackClick({ event_category: `${ZONA_BANNER_NOMBRE} | ${data.zona} | ${data.zonas_id}`, event_label: `${BANNER_NOMBRE} | ${data.denominacion} | ${data.banners_id}` }); // zona //trackClick({ event_category: `${ZONA_BANNER_NOMBRE} | ${data.zona} | ${data.zonas_id}`, event_label: `${data.denominacion} | ${data.banners_id}` }); }); var img = document.createElement('img'); img.src = src; img.height = `${height}`; img.width = `${width}`; img.alt="Publicidad"; img.loading = 'lazy'; img.classList.add("imgPublicidad"); img.style.background = 'none'; if(data.url_mobile || data.url){ var enlace = document.createElement('a'); if(isMobile && data.url_mobile){ if(data.target_mobile){ enlace.target = data.target_mobile; } enlace.href = data.url_mobile; } if(!isMobile && data.url){ if(data.target){ enlace.target = data.target; } enlace.href = data.url; } zonas_noticias[i].appendChild(img); enlace.appendChild(img.cloneNode()); // Clonamos la imagen para mantenerla en su lugar original zonas_noticias[i].replaceChild(enlace, img); }else{ zonas_noticias[i].appendChild(img); } img = null; enlace = null; } } }
function shareOnFacebook() {
var encodedUrl = encodeURIComponent(window.location.href); var facebookUrl="https://www.facebook.com/sharer/sharer.php?u=" + encodedUrl; window.open(facebookUrl); }
function shareOnTwitter() { var encodedUrl = encodeURIComponent(window.location.href); var twitterUrl="https://twitter.com/intent/tweet?url=" + encodedUrl; window.open(twitterUrl); }
function shareByEmail() { var encodedUrl = encodeURIComponent(window.location.href); var subject="Echa un vistazo a este enlace"; var body = '¡Hola! He encontrado este enlace interesante: ' + window.location.href; var mailtoUrl="mailto:?subject=" + encodeURIComponent(subject) + '&body=' + encodeURIComponent(body); window.location.href = mailtoUrl; }
function shareOnWhatsApp() { var encodedUrl = encodeURIComponent(window.location.href); var whatsappUrl = isMobile == true ? 'https://api.whatsapp.com/send?text=" + encodedUrl : "https://web.whatsapp.com/send?text=" + encodedUrl; window.open(whatsappUrl); }
function copyToClipboard() { var tempInput = document.createElement("input"); tempInput.value = window.location.href; document.body.appendChild(tempInput); tempInput.select(); tempInput.setSelectionRange(0, 99999); document.execCommand("copy"); document.body.removeChild(tempInput); alert("Enlace copiado al portapapeles: " + window.location.href); }
// Import the functions you need from the SDKs you need import { initializeApp } from "https://www.gstatic.com/firebasejs/10.11.0/firebase-app.js"; import { getMessaging, getToken, onMessage } from "https://www.gstatic.com/firebasejs/10.11.0/firebase-messaging.js";
const notificationsStatusBadge = document.getElementById("notificationsStatusBadge"); const notificationsSubscriptionForceEnable = document.getElementById("notificationsSubscriptionForceEnable"); const mainIconNotificacionStatus = document.getElementById("mainIconNotificacionStatus"); const mainIconNotificacionStatusEnabled = document.getElementById("mainIconNotificationsEnabled"); const mainIconNotificacionStatusDisabled = document.getElementById("mainIconNotificationsDisabled");
const firebaseConfig = {"apiKey":"AIzaSyAyjd05GJJfI-RXudJSzZtlW0n950xNP_o","authDomain":"-ecc9d.firebaseapp.com","projectId":"-ecc9d","storageBucket":"-ecc9d.appspot.com","messagingSenderId":"834888897064","appId":"1:834888897064:web:21c5a778c30c169c45db1d","measurementId":"G-KXZ373ZFVE"}; const firebaseVersion = 2;
// Initialize Firebase const app = initializeApp(firebaseConfig); const messaging = getMessaging(app);
var messagingNeedUpdate = false;
if ("serviceWorker' in navigator) { navigator.serviceWorker.register('/firebase-messaging-sw.js?_v=v3-22').then(function(registration) { }).catch(function(error) {
}); } function checkSubscriptionDate(date, days) { let dateObject = new Date(date);
if (isNaN(dateObject.getTime())) { return false; }
let currentDate = new Date();
let pastDate = new Date(dateObject); pastDate.setDate(pastDate.getDate() + days);
return currentDate >= pastDate; }
function checkSubscriptionNotification(){
let localToken = pushSubscriptionLocalGet();
if(localToken == null){
return { subscribed: false, ask: true }; }else{
try { let tokenObj = JSON.parse(localToken);
if(tokenObj?.date == null){ // VERSION ANTERIOR messagingNeedUpdate = true;
tokenObj.date="2026-04-19"; pushSubscriptionLocalSave(tokenObj);
return { subscribed: true, ask: true, token: tokenObj?.token, firebaseVersion: tokenObj?.firebaseVersion }; }
if(tokenObj?.subscribed == 1 || tokenObj?.subscribed == true){ // Subscrito if(tokenObj?.firebaseVersion != firebaseVersion){ if(checkSubscriptionDate(tokenObj?.date, 7)){ messagingNeedUpdate = true; tokenObj.date="2026-04-19"; pushSubscriptionLocalSave(tokenObj); return { subscribed: true, ask: true, token: tokenObj?.token, firebaseVersion: tokenObj?.firebaseVersion }; }else{ return { subscribed: true, ask: false, token: tokenObj?.token, firebaseVersion: tokenObj?.firebaseVersion }; } }else{ return { subscribed: true, ask: false, token: tokenObj?.token, firebaseVersion: tokenObj?.firebaseVersion }; } }else{ // NO subscrito
if(checkSubscriptionDate(tokenObj?.date, 7)){ return { subscribed: false, ask: true, token: tokenObj?.token, firebaseVersion: tokenObj?.firebaseVersion }; } return { subscribed: false, ask: false, token: tokenObj?.token, firebaseVersion: tokenObj?.firebaseVersion }; } } catch (error) { // Token incorrecto pushSubscriptionLocalRemove(); return { subscribed: false, ask: false, token: tokenObj?.token, firebaseVersion: tokenObj?.firebaseVersion }; }
}
}
setTimeout(() => {
let subscriptionNotificationStatus = checkSubscriptionNotification();
if(subscriptionNotificationStatus?.ask){ const pushSubscriptionModal = document.getElementById("pushSubscriptionModal"); const pushSubscriptionModalDetalle = document.getElementById("pushSubscriptionModalDetalle"); const statusPagePushSubscriptionButton = document.getElementById("statusPagePushSubscriptionButton"); const statusPagePushSubscriptionButtonDecline = document.getElementById("statusPagePushSubscriptionButtonDecline");
if (pushSubscriptionModal) { statusPagePushSubscriptionButton.classList.add("hidden"); pushSubscriptionModal.classList.remove("hidden"); declinePushSubscription.classList.remove("hidden"); acceptPushSubscription.classList.remove("hidden"); if(messagingNeedUpdate){ pushSubscriptionModalDetalle.classList.remove("hidden"); statusPagePushSubscriptionButton.classList.remove("hidden"); statusPagePushSubscriptionButtonDecline.classList.remove("hidden"); declinePushSubscription.classList.add("hidden"); acceptPushSubscription.classList.add("hidden");
} setTimeout(function() { pushSubscriptionModal.classList.add("opacity-100"); }, 100);
} }
pushSubscriptionInit(subscriptionNotificationStatus);
}, 3000 );
function pushSubscriptionInit(subscriptionNotificationStatus){
if ("Notification" in window) { if(subscriptionNotificationStatus?.subscribed){ switch (Notification.permission) {
case 'granted': pushSubscriptionOnMessage(); break;
case 'denied': if(subscriptionNotificationStatus?.token){ savedTokenUnsubscribeAndDelete(subscriptionNotificationStatus?.token); } notificationsStatusBadgeUpdate('disabled'); break;
default: pushSubscriptionRequestPermission(); break; } }else{ notificationsStatusBadgeUpdate('disabled'); } }else{ notificationsStatusBadgeUpdate('unsupported'); }
}
function pushSubscriptionRequestPermission(){ Notification.requestPermission().then(function(permission) {
if (permission === 'granted') {
getToken(messaging).then(function(token){
pushSubscriptionOnMessage();
}).catch(function(error) {
});
} else {
let tokenObj = pushSubscriptionLocalGet();
if(tokenObj?.token != null){ savedTokenUnsubscribeAndDelete(tokenObj?.token); }else{ let tokenData = { "token": null, "subscribed": false, "date": '2026-04-19' } pushSubscriptionLocalSave(tokenData); }
} }).catch(function(err) { notificationsStatusBadgeUpdate('error'); }); }
function pushSubscriptionOnMessage(){
getToken(messaging).then(function(token){
saveTokenAndSubscribe(token);
notificationsStatusBadgeUpdate('enabled');
onMessage(messaging, (payload) => {
if(!payload.data){ return false;
}
const toastContainer = document.createElement('div'); toastContainer.style.position = 'fixed'; toastContainer.style.top = '20px'; toastContainer.style.right="20px"; toastContainer.style.backgroundColor="#333"; toastContainer.style.color="white"; toastContainer.style.padding = '15px'; toastContainer.style.borderRadius="5px"; toastContainer.style.zIndex = '100'; toastContainer.style.display = 'block'; toastContainer.style.width="300px"; document.body.appendChild(toastContainer);
const toastTitle = document.createElement('p'); toastTitle.textContent = payload.notification.title; toastTitle.style.marginTop = '0'; toastTitle.style.fontSize="10px"; toastContainer.appendChild(toastTitle);
const toastBodyLink = document.createElement('a'); toastBodyLink.href = payload.data.link; const toastBody = document.createElement('h1'); toastBody.textContent = payload.notification.body; toastBody.style.marginBottom = '10px'; toastBodyLink.appendChild(toastBody); toastContainer.appendChild(toastBodyLink);
const toastImageLink = document.createElement('a'); toastImageLink.href = payload.data.link; const toastImage = document.createElement('img'); toastImage.src = payload.notification.image; toastImage.alt = payload.notification.title; toastImage.style.display = 'block'; toastImage.style.maxWidth="100%"; toastImage.style.maxHeight="120px"; toastImageLink.appendChild(toastImage); toastContainer.appendChild(toastImageLink);
const closeButton = document.createElement('span'); closeButton.textContent="×"; closeButton.className="close"; closeButton.style.position = 'absolute'; closeButton.style.top = '5px'; closeButton.style.right="10px"; closeButton.style.cursor="pointer"; closeButton.onclick = hideToast; toastContainer.appendChild(closeButton);
function hideToast() { document.body.removeChild(toastContainer); }
function openURL(url) { window.location.href = url; }
});
}).catch(function(error) {
notificationsStatusBadgeUpdate('error');
}); } function notificationsStatusBadgeUpdate(status){
if(notificationsStatusBadge){ notificationsStatusError.classList.add("hidden"); notificationsSubscriptionForceEnable.classList.add("hidden"); } if(mainIconNotificacionStatus){ mainIconNotificacionStatusDisabled.classList.add("hidden"); } switch (status) { case "enabled":
if(notificationsStatusBadge){ notificationsStatusBadge.innerHTML = 'SUSCRIPTO'; notificationsStatusBadge.style.backgroundColor = "#1b8724"; notificationsStatusBadge.style.color = "#ffffff"; } if(mainIconNotificacionStatus){ mainIconNotificacionStatusDisabled.classList.add("hidden"); mainIconNotificacionStatusEnabled.classList.remove("hidden"); }
break; case "disabled": if(notificationsStatusBadge){ notificationsStatusBadge.innerHTML = 'NO SUSCRIPTO'; notificationsStatusBadge.style.backgroundColor = "#DDDDDD"; notificationsStatusBadge.style.color = "#333333"; notificationsSubscriptionForceEnable.classList.remove("hidden"); } if(mainIconNotificacionStatus){ mainIconNotificacionStatusEnabled.classList.add("hidden"); mainIconNotificacionStatusDisabled.classList.remove("hidden"); } break; case "error": if(notificationsStatusBadge){ notificationsStatusBadge.innerHTML = 'EN PAUSA'; notificationsStatusBadge.style.backgroundColor = "#DDDDDD"; notificationsStatusBadge.style.color = "#333333"; notificationsStatusError.classList.remove("hidden"); } if(mainIconNotificacionStatus){ mainIconNotificacionStatusEnabled.classList.add("hidden"); mainIconNotificacionStatusDisabled.classList.remove("hidden"); } break; case "unsupported": if(notificationsStatusBadge){ notificationsStatusBadge.innerHTML = 'NO SOPORTADO'; notificationsStatusBadge.style.backgroundColor = "#DDDDDD"; notificationsStatusBadge.style.color = "#333333"; } if(mainIconNotificacionStatus){ mainIconNotificacionStatusEnabled.classList.add("hidden"); mainIconNotificacionStatusDisabled.classList.remove("hidden"); } break;
}
}
async function saveTokenAndSubscribe(token) {
let localToken = pushSubscriptionLocalGet();
try { let tokenObj = JSON.parse(localToken);
if(tokenObj?.token == token){
if(tokenObj?.firebaseVersion != firebaseVersion){ /* Nueva version -> se subscribe */ return await firebaseSubscribeApi(token, tokenObj); }else{ /* Token local igual al token -> Se ignora */ }
}else{ /* UNSUBSCRIBE ANTERIOR */ if(tokenObj?.token != null){ savedTokenUnsubscribeAndDelete(tokenObj?.token); }
return await firebaseSubscribeApi(token, tokenObj);
}
} catch (error) {
}
}
async function firebaseSubscribeApi(token, tokenObj){
// SUBSCRIBE ACTUAL const formData = new URLSearchParams({ 'token': token });
try {
const response = await fetch(apiURL + 'firebase/token-subscribe/', { method: 'POST', "headers": { "content-type": "application/x-www-form-urlencoded; charset=UTF-8", }, body: formData });
const data = await response.json();
if (data.success) {
let tokenData = { "token": token, "subscribed": true, "firebaseVersion": data?.data?.firebaseVersion, "date": '2026-04-19' } pushSubscriptionLocalSave(tokenData); }
return data; } catch (error) {
return null;
} }
function pushSubscriptionLocalSave(tokenObj){ window.localStorage.setItem('firebase-token',JSON.stringify(tokenObj)); } function pushSubscriptionLocalGet(){ return window.localStorage.getItem('firebase-token'); } function pushSubscriptionLocalRemove(){ return window.localStorage.removeItem('firebase-token'); }
async function savedTokenUnsubscribeAndDelete(token) { const url = apiURL + 'firebase/token-unsubscribe/'; const formData = new URLSearchParams({ 'token': token });
try {
const response = await fetch(url, { method: 'POST', "headers": { "content-type": "application/x-www-form-urlencoded; charset=UTF-8", }, body: formData });
const data = await response.json();
let tokenData = { "token": null, "subscribed": false, "date": '2026-04-19' } pushSubscriptionLocalSave(tokenData);
return data; } catch (error) { // Handle error if necessary return null; } }
if(notificationsSubscriptionForceEnable){ notificationsSubscriptionForceEnable.addEventListener("click", function(event) {
notificationsSubscriptionForceEnable.classList.add("hidden"); pushSubscriptionModal.classList.add("hidden"); let tokenData = { "token": null, "subscribed": true, "date": '2026-04-19' } pushSubscriptionLocalSave(tokenData); pushSubscriptionRequestPermission(); }) }
var declinePushSubscription = document.getElementById("declinePushSubscription");
declinePushSubscription.addEventListener("click", function(event) { let pushSubscriptionModal = document.getElementById("pushSubscriptionModal"); pushSubscriptionModal.classList.add("hidden"); let tokenData = { "token": null, "subscribed": false, "date": '2026-04-19' } pushSubscriptionLocalSave(tokenData); });
var acceptPushSubscription = document.getElementById("acceptPushSubscription");
acceptPushSubscription.addEventListener("click", function(event) { pushSubscriptionModal.classList.add("hidden"); let tokenData = { "token": null, "subscribed": true, "date": '2026-04-19' } pushSubscriptionLocalSave(tokenData); pushSubscriptionRequestPermission(); });
var statusPagePushSubscriptionButtonDecline = document.getElementById("statusPagePushSubscriptionButtonDecline");
statusPagePushSubscriptionButtonDecline.addEventListener("click", function(event) { let pushSubscriptionModal = document.getElementById("pushSubscriptionModal"); pushSubscriptionModal.classList.add("hidden");
});
var statusPagePushSubscriptionButton = document.getElementById("statusPagePushSubscriptionButton");
statusPagePushSubscriptionButton.addEventListener("click", function(event) { window.location.href = "https://www..com.ar/notificationstatus"; });
const modalPopup = document.getElementById("bannerPopup"); let popup = JSON.parse(modalPopup.dataset.src); if(!popup?.id){ popup = popup[Math.floor(Math.random()*popup.length)]; } const cookieNamePopup = `popup-${popup.zonas_id}-${popup.id}`; const cookiePopup = getCookie(cookieNamePopup);
if (!cookiePopup) {
let img = modalPopup.querySelector('img'); let showPopup = false;
if(isMobile){
switch (popup.banners_versiones_id) { case '1': /* Compartida ( Desktop y Mobile ) */ img.setAttribute('src', popup.image); img.style.width = `${popup.banner_ancho}.px`; popup.url = popup.url; popup.target = popup.target; showPopup = true; break; case '2': /* Diferenciada ( Desktop / Mobile ) */ img.setAttribute('src', popup.image_mobile); img.style.width = `${popup.mobile_ancho}.px`; popup.url = popup.url_mobile; popup.target = popup.target_mobile; showPopup = true; break; case '3': /* Solo Desktop */ popup.url = null; popup.target = null; break; case '4': /* Solo Mobile */ img.setAttribute('src', popup.image_mobile) img.style.width = `${popup.mobile_ancho}.px`; popup.url = popup.url_mobile; popup.target = popup.target_mobile; showPopup = true; break;
default: break; }
}else{
switch (popup.banners_versiones_id) { case '1': /* Compartida ( Desktop y Mobile ) */ img.setAttribute('src', popup.image); img.style.height = `${popup.banner_alto}.px`; img.style.width = `${popup.banner_ancho}.px`; popup.url = popup.url; popup.target = popup.target; showPopup = true; break; case '2': /* Diferenciada ( Desktop / Mobile ) */ img.setAttribute('src', popup.image); img.style.height = `${popup.banner_alto}.px`; img.style.width = `${popup.banner_ancho}.px`; popup.url = popup.url; popup.target = popup.target; showPopup = true; break; case '3': /* Solo Desktop */ img.setAttribute('src', popup.image); img.style.height = `${popup.banner_alto}.px`; img.style.width = `${popup.banner_ancho}.px`; popup.url = popup.url; popup.target = popup.target; showPopup = true; break; case '4': /* Solo Mobile */ popup.url = null; popup.target = null; break;
default: break; }
}
if(showPopup){
if(popup.url_mobile || popup.url){
var enlace = document.createElement('a');
if(popup.target){ enlace.target = popup.target; } enlace.href = popup.url;
enlace.appendChild(img.cloneNode());
img.parentNode.replaceChild(enlace, img);
}
modalPopup.classList.remove("hidden");
let button = modalPopup.querySelector('button');
button.addEventListener("click", () => {
setCookieMinutes(cookieNamePopup, 'closed', cookiesBanners.zonaBannerPopup.minutosExpire); });
/**** Tracking Analytics ****/ // Banner //trackImpresion({ event_category: BANNER_DEFAULT_EVENT_CATEGORY, event_label: `${popup.label} | ${popup.id}` }); // Zona trackImpresion({ event_category: `${ZONA_BANNER_NOMBRE} | PopUp | ${popup.zonas_id}`, event_label: `${BANNER_NOMBRE} | ${popup.label} | ${popup.id}` });
modalPopup.addEventListener("click", () => { // banner //trackClick({ event_category: BANNER_DEFAULT_EVENT_CATEGORY, event_label: `${popup.label} | ${popup.id}` }); // zona trackClick({ event_category: `${ZONA_BANNER_NOMBRE} | PopUp | ${popup.zonas_id}`, event_label: `${BANNER_NOMBRE} | ${popup.label} | ${popup.id}` });
modalPopup.classList.add("hidden"); });
}
}
const modalZocalo = document.getElementById("bannerZocalo"); let zocalo = JSON.parse(modalZocalo.dataset.src); if(!zocalo?.id){ zocalo = zocalo[Math.floor(Math.random()*zocalo.length)]; } const cookieNameZocalo = `zocalo-${zocalo.zonas_id}-${zocalo.id}`; const cookieZocalo = getCookie(cookieNameZocalo);
if (!cookieZocalo) {
let img = modalZocalo.querySelector('img'); let showZocalo = false;
if(isMobile){
switch (zocalo.banners_versiones_id) { case '1': /* Compartida ( Desktop y Mobile ) */ img.setAttribute('src', zocalo.image); img.style.width = `${zocalo.banner_ancho}.px`; zocalo.url = zocalo.url; zocalo.target = zocalo.target; showZocalo = true; break; case '2': /* Diferenciada ( Desktop / Mobile ) */ img.setAttribute('src', zocalo.image_mobile); img.style.width = `${zocalo.mobile_ancho}.px`; zocalo.url = zocalo.url_mobile; zocalo.target = zocalo.target_mobile; showZocalo = true; break; case '3': /* Solo Desktop */ zocalo.url = null; zocalo.target=""; break; case '4': /* Solo Mobile */ img.setAttribute('src', zocalo.image_mobile) img.style.width = `${zocalo.mobile_ancho}.px`; zocalo.url = zocalo.url_mobile; zocalo.target = zocalo.target_mobile; showZocalo = true; break;
default: break; }
}else{
switch (zocalo.banners_versiones_id) { case '1': /* Compartida ( Desktop y Mobile ) */ img.setAttribute('src', zocalo.image); img.style.height = `${zocalo.banner_alto}.px`; img.style.width = `${zocalo.banner_ancho}.px`; zocalo.url = zocalo.url; zocalo.target = zocalo.target; showZocalo = true; break; case '2': /* Diferenciada ( Desktop / Mobile ) */ img.setAttribute('src', zocalo.image); img.style.height = `${zocalo.banner_alto}.px`; img.style.width = `${zocalo.banner_ancho}.px`; zocalo.url = zocalo.url; zocalo.target = zocalo.target; showZocalo = true; break; case '3': /* Solo Desktop */ img.setAttribute('src', zocalo.image); img.style.height = `${zocalo.banner_alto}.px`; img.style.width = `${zocalo.banner_ancho}.px`; zocalo.url = zocalo.url; zocalo.target = zocalo.target; showZocalo = true; break; case '4': /* Solo Mobile */ zocalo.url = null; break;
default: break; }
}
if(showZocalo){
if(zocalo.url){
var enlace = document.createElement('a');
if(zocalo.target){ enlace.target = zocalo.target; } enlace.href = zocalo.url;
enlace.appendChild(img.cloneNode());
img.parentNode.replaceChild(enlace, img);
}
modalZocalo.classList.remove("hidden");
let button = modalZocalo.querySelector('button');
button.addEventListener("click", () => { setCookieMinutes(cookieNameZocalo, 'closed', cookiesBanners.zonaBannerZocalo.minutosExpire); });
/**** Tracking Analytics ****/ // Banner //trackImpresion({ event_category: BANNER_DEFAULT_EVENT_CATEGORY, event_label: `${zocalo.label} | ${zocalo.id}` }); // Zona trackImpresion({ event_category: `${ZONA_BANNER_NOMBRE} | Zocalo | ${zocalo.zonas_id}`, event_label: `${BANNER_NOMBRE} | ${zocalo.label} | ${zocalo.id}` });
modalZocalo.addEventListener("click", () => { // banner // trackClick({ event_category: BANNER_DEFAULT_EVENT_CATEGORY, event_label: `${zocalo.label} | ${zocalo.id}` }); // zona trackClick({ event_category: `${ZONA_BANNER_NOMBRE} | Zocalo | ${zocalo.zonas_id}`, event_label: `${BANNER_NOMBRE} | ${zocalo.label} | ${zocalo.id}` });
modalZocalo.classList.add("hidden"); }); }
}