Lo más leído

  1. Investigación
  2. Investigación
  3. Investigación
  4. Investigación
  5. Investigación
  6. Farmacia
  7. Nutrición
  8. Farmacia
  9. Investigación
  10. Farmacia
  11. Investigación
  12. Estética
  13. Investigación
  14. Asistencia
  15. Investigación
  16. Nutrición
  17. Nutrición
  18. Nutrición
  19. Asistencia
  20. Investigación

















`; } function shouldRun() { const host = window.location.hostname; return host.includes("aldia.cat") || host.includes("europapress.es"); } function insertBanner() { const host = window.location.hostname; const isEP = host.includes("europapress.es"); // 1. Buscar el artículo (por ID o por enlace contenido) let article = document.getElementById(targetId); if (!article) { const link = document.querySelector(`a[href*="${targetId}"]`); if (link) { article = link.closest('article.ep-articleStandard') || link.closest('article') || link; } } if (article) { if (article.getAttribute('data-banner-added')) return true; if (isEP) { // Caso Europa Press: Insertar dentro de .ep-articleContent const content = article.querySelector('.ep-articleContent'); if (content) { content.insertAdjacentHTML('afterbegin', getBannerHtml(true)); } else { // Fallback por si no existe la clase específica article.insertAdjacentHTML('afterbegin', getBannerHtml(true)); } } else { // Caso AlDia / Otros: Insertar antes del artículo article.insertAdjacentHTML('beforebegin', getBannerHtml(false)); } article.setAttribute('data-banner-added', 'true'); return true; } return false; } const isLocal = ["", "localhost", "127.0.0.1"].includes(window.location.hostname); if (!shouldRun() && !isLocal) return; if (!insertBanner()) { const observer = new MutationObserver(() => { if (insertBanner()) observer.disconnect(); }); observer.observe(document.documentElement, { childList: true, subtree: true }); document.addEventListener("DOMContentLoaded", insertBanner); } })();
`; } }

Lo más leído

Boletín de Salud
Recibe un email cada día con las noticias más importantes.