Bienvenida suscripción digital Heraldo

¡Mejora tu experiencia en solo 5 pasos! Paso 1/5

¡Bienvenido a la suscripción de Heraldo!

Infórmate mejor que nunca con nuestras newsletters

`; const checkbox = newNode.querySelector("input.newsletteroption[type=checkbox]"); checkbox.addEventListener("click", (event) => handleCheckBoxClick(event.target)); return newNode; }; const saveButton = document.querySelector(".onboarding-digital button.bttn"); saveButton.addEventListener("click", (event) => { event.target.disabled = true; event.target.textContent = "Guardando..."; waitForGigyaData().then(() => { setTimeout(() => { window.location.href = nextStep; }, 2500); }); }); const fillList = function () { new newsletterAction({ mode: "list", listContainerSelector: ".newsletterBox .newsletter", saveListBtnSelector: ".onboarding-digital button.bttn", apiDomain: "https://newsletter-api-osspk2fj2q-ew.a.run.app", mediaId: "001", reactivateForm: "https://heraldo.us7.list-manage.com/subscribe?u=bddb6c2cbebb4132625b97f8e&id=", itemListTemplate: itemListTemplate, }); }; const addClickEventToNewsletterDescription = function () { return new Promise((resolve) => { const checkInputsExistence = () => { const toggleInputs = document.querySelectorAll(".btn-nl-description"); if (toggleInputs.length === 0) { setTimeout(checkInputsExistence, 100); } else { toggleInputs.forEach(function (input) { input.addEventListener("click", function () { toggleInputs.forEach(function (otherInput) { if (otherInput !== input) { otherInput.checked = true; } }); }); }); resolve(); } }; checkInputsExistence(); }); }; const loadNewsletters = async function () { waitForGigyaData() .then(updateIsSubscriptor) .then(fillList) .then(addClickEventToNewsletterDescription) .then(displayNewsletters) .catch(() => { showLogin(); gigya.accounts.addEventHandlers({ onLogin: () => { location.reload(); }, }); }); }; if (typeof newsletterAction !== "undefined") { loadNewsletters(); } else { const script = document.createElement("script"); script.onload = loadNewsletters; script.src = "https://dkumiip2e9ary.cloudfront.net/js/newsletters/newsletters_v2.js"; document.head.appendChild(script); } })();