Efemérides de hoy
—-
Efemérides de hoy
`${css}${propertyName}:${stylesAgree.getPropertyValue(
propertyName
)};`
);
newBtnDisagreeCustom.style.cssText = cssText
newBtnDisagreeCustom.style.marginRight = “10px”;
}
// Estilos con botón en fondo blanco y letra azul:
/*const cssText = “background-color: #fff;color: rgb(0, 74, 173);border-color: rgb(0, 74, 173);”;
newBtnDisagreeCustom.style.cssText = cssText;
*/
// Añadimos un evento al nuevo botón
newBtnDisagreeCustom.addEventListener(‘click’, function (event) {
console.log(“Didomi Event Custom: click”);
// Ocultamos Didomi y mostramps la pantalla “nueva” de suscripción
showModalSubscription();
let divDidomi = document.getElementById(‘didomi-host’);
divDidomi.style.display = “none”;
});
}
});
function _didomiEvents() {
// Capturamos los eventos de Didomi
window.didomiEventListeners = window.didomiEventListeners || [];
window.didomiEventListeners.push({
event: ‘preferences.shown’,
listener: function () {
console.log(“Didomi Event: preferences.shown”);
// Añadimos un Timeout para que de tiempo a cargar la pantalla de preferencias
setTimeout(function () {
let btnPrefDisagreeAll = document.querySelector(‘.didomi-consent-popup-actions.didomi-popup-actions.didomi-buttons.didomi-buttons-all .didomi-components-button.didomi-button.didomi-button-standard.standard-button’);
if (btnPrefDisagreeAll == null) return;
let newBtnPrefDisagreeCustom = btnPrefDisagreeAll.cloneNode(true);
let btnPrefAgreeAll = document.querySelector(‘.didomi-consent-popup-actions.didomi-popup-actions.didomi-buttons.didomi-buttons-all .didomi-components-button.didomi-button.didomi-components-button–color.didomi-button-highlight.highlight-button’);
newBtnPrefDisagreeCustom.setAttribute(‘id’, ‘disagree-preferences-button-custom’);
btnPrefDisagreeAll.after(newBtnPrefDisagreeCustom);
btnPrefDisagreeAll.style.display = “none !important”;
btnPrefDisagreeAll.className = “hidden-button”;
// Assignamos los mismos estilos que el botón de aceptar al nuevo botón
const stylesPrefAgree = window.getComputedStyle(btnPrefAgreeAll, null);
if (stylesPrefAgree.cssText !== ”) { // problema de compatibilidad con algunos navegadores
newBtnPrefDisagreeCustom.style.cssText = stylesPrefAgree.cssText;
} else {
const cssPrefText = Object.values(stylesPrefAgree).reduce(
(css, propertyName) =>
`${css}${propertyName}:${stylesPrefAgree.getPropertyValue(
propertyName
)};`
);
newBtnPrefDisagreeCustom.style.cssText = cssPrefText
newBtnPrefDisagreeCustom.style.marginRight = “10px”;
newBtnPrefDisagreeCustom.style.width = “auto”;
}
// Añadimos un evento al nuevo botón
newBtnPrefDisagreeCustom.addEventListener(‘click’, function (event) {
console.log(“Didomi Event Custom: click”);
// Ocultamos Didomi y mostramps la pantalla “nueva” de suscripción
showModalSubscription();
let divDidomi = document.getElementById(‘didomi-host’);
divDidomi.style.display = “none”;
});
}, 500);
}
});
window.didomiEventListeners.push({
event: ‘preferences.clickclose’,
listener: function () {
console.log(“Didomi Event: preferences.clickclose”);
}
});
window.didomiEventListeners.push({
event: ‘preferences.hidden’,
listener: function () {
console.log(“Didomi Event: preferences.hidden”);
}
});
// Botón de Didomi de Rechazar todo en las preferencias
window.didomiEventListeners.push({
event: ‘preferences.clickdisagreetoall’,
listener: function () {
debugger;
console.log(“Didomi Event: preferences.clickdisagreetoall”);
}
});
// Botón de Didomi al darle a Guardar en las preferencias??
window.didomiEventListeners.push({
event: ‘preferences.clicksavechoices’,
listener: function () {
debugger;
console.log(“Didomi Event: preferences.clicksavechoices”);
Didomi.getObservableOnUserConsentStatusForVendor(‘google’)
.subscribe(function (consentStatus) {
if (consentStatus === undefined) {
console.log(“Didomi Event: Google Undefined”);
} else {
console.log(“Didomi Event: Google ” + consentStatus);
}
});
}
});
}
// Evento que salta al cargar Didomi
window.didomiOnReady.push(function (Didomi) {
console.log(“Didomi notice visible: ” + Didomi.notice.isVisible());
if (Didomi.notice.isVisible()) {
// Miramos si el usuario había aceptado o no las cookies antes y si está logado para rechazar cookies automáticamente
if (typeof fnLoggedwithRights !== “undefined” && fnLoggedwithRights()) {
console.log(“Didomi > Rechazamos automáticamente las cookies”);
Didomi.setUserDisagreeToAll(); // Cierra automáticamente Didomi
}
// Adjuntamos los eventos:
_didomiEvents()
}
// Call other functions on the SDK
Didomi.getObservableOnUserConsentStatusForVendor(‘google’)
.subscribe(function (consentStatus) {
if (consentStatus === undefined) {
// The consent status for the vendor is unknown
mgr.consent.google = -1;
} else if (consentStatus === true) {
// The user has given consent to the vendor
mgr.consent.google = 1;
} else if (consentStatus === false) {
// The user has denied consent to the vendor
mgr.consent.google = 0;
}
var dataLayerPosition = getDatalayerPosition();
if (dataLayerPosition >= 0) {
window[“dataLayer”][dataLayerPosition].userConsent.GA = mgr.consent.google == -1 ? 0 : mgr.consent.google;
}
//log(“Didomi > Google > Vendor status”, consentStatus);
if (consentStatus !== undefined) {
var eventAds = new CustomEvent(“mgr-ads”, { “detail”: “Start ads” });
document.dispatchEvent(eventAds);
}
});
Didomi.getObservableOnUserConsentStatusForVendor(‘c:googleana-4TXnJigR’)
.subscribe(function (consentStatus) {
if (consentStatus === undefined && mgr.consent.google == 1) {
const transaction = Didomi.openTransaction();
transaction.enableVendor(‘c:googleana-4TXnJigR’);
transaction.commit();
}
});
Didomi.getObservableOnUserConsentStatusForVendor(’77’)
.subscribe(function (consentStatus) {
if (consentStatus === undefined) {
// The consent status for the vendor is unknown
mgr.consent.comscore = -1;
} else if (consentStatus === true) {
// The user has given consent to the vendor
mgr.consent.comscore = 1;
} else if (consentStatus === false) {
// The user has denied consent to the vendor
var prevConsent = mgr.consent.comscore;
mgr.consent.comscore = 0;
if (prevConsent == 1) { // updated consent
if (dataLayer)
dataLayer.push({ ‘event’: ‘CSpageview’, ‘eventLabel’: mgr.consent.comscore });
}
}
// notifyPVwithConsent
var dataLayerPosition = getDatalayerPosition();
if (dataLayerPosition >= 0) {
window[“dataLayer”][dataLayerPosition].userConsentGDPR = mgr.consent.comscore;
window[“dataLayer”][dataLayerPosition].userConsent.CS = mgr.consent.comscore;
}
});
Didomi.getObservableOnUserConsentStatusForVendor(‘c:facebook-cDpcJVKg’)
.subscribe(function (consentStatus) {
if (consentStatus === undefined) {
// The consent status for the vendor is unknown
mgr.consent.facebook = 1;
} else if (consentStatus === true) {
// The user has given consent to the vendor
mgr.consent.facebook = 1;
} else if (consentStatus === false) {
// The user has denied consent to the vendor
mgr.consent.facebook = 0;
}
var dataLayerPosition = getDatalayerPosition();
if (dataLayerPosition >= 0)
window[“dataLayer”][dataLayerPosition].userConsent.FA = mgr.consent.facebook;
});
Didomi.getObservableOnUserConsentStatusForVendor(‘c:chartbeat’)
.subscribe(function (consentStatus) {
if (consentStatus === undefined) {
// The consent status for the vendor is unknown
mgr.consent.chartbeat = -1;
} else if (consentStatus === true) {
// The user has given consent to the vendor
mgr.consent.chartbeat = 1;
} else if (consentStatus === false) {
// The user has denied consent to the vendor
mgr.consent.chartbeat = 0;
}
var dataLayerPosition = getDatalayerPosition();
if (dataLayerPosition >= 0)
window[“dataLayer”][dataLayerPosition].userConsent.CB = mgr.consent.chartbeat;
});
var event = new CustomEvent(“mgr-gtm-load”, { “detail”: “Load the GTM” });
document.dispatchEvent(event);
});]]>Iniciar Sesión`,
user: `Mi Perfil`,
userTemplate: `\${name}`,
bookmark:
{
template: `\${window.zentralTemplates.bookmark.save}`,
save: `Guardar`,
saved: `Guardado`
},
loginwall:
{
template: `\${window.zentralTemplates.loginwall.returnText}\${window.zentralTemplates.loginwall.loginText}\${window.zentralTemplates.loginwall.text}\${window.zentralTemplates.loginwall.registerText}`,
returnText: `No me interesa`,
text: `Leer este artículo es una de las ventajas que tienen nuestros usuarios registrados.`,
registerText: `¡Regístrate gratis!`,
loginText: `¿Ya eres suscriptor? Inicia sesión`
},
paywall:
{
template: `\${window.zentralTemplates.paywall.returnText}\${window.zentralTemplates.paywall.loginText}\${window.zentralTemplates.paywall.text}\${window.zentralTemplates.paywall.partClaim}`,
uniqueTemplate: `No me interesa¿Ya eres suscriptor? Inicia sesiónLee \${artTitle} por un módico precio.Suscríbete ahora`,
returnText: `No me interesa`,
text: `Este contenido es exclusivo para suscriptores
Descubre los eventos y las efemérides más importantes que ocurrieron tal día como hoy. Por cierto, ¿sabes qué ocurrió el día de tu cumpleaños? Navega por el calendario, busca el día que naciste y entra en los reportajes que tenemos sobre los personajes y acontecimientos más importantes de la historia. La posición de los días en el calendario no corresponde con los días de la semana del año.
SUSCRÍBETE Y CONOCE LA HISTORIA MEJOR QUE NADIE
Elige tu revista
Y disfruta de un espectacular número cada mes en tu casa y en tus dispositivos
now;
}
mgr.forceHideInterstitial = forceHideInterstitial();
]]> 1 && void 0 !== arguments[1]) || arguments[1], c = document.createElement(“script”); c.src = e, t ? c.type = “module” : (c.async = !0, c.type = “text/javascript”, c.setAttribute(“nomodule”, “”)); var n = document.getElementsByTagName(“script”)[0]; n.parentNode.insertBefore(c, n) } function t(t, c, n) { var a, o, r; null !== (a = t.marfeel) && void 0 !== a || (t.marfeel = {}), null !== (o = (r = t.marfeel).cmd) && void 0 !== o || (r.cmd = []), t.marfeel.config = n, t.marfeel.config.accountId = c; var i = “https://sdk.mrf.io/statics”; e(“”.concat(i, “/marfeel-sdk.js?id=”).concat(c), !0), e(“”.concat(i, “/marfeel-sdk.es5.js?id=”).concat(c), !1) } !function (e, c) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; t(e, c, n) }
(window, 276, {});
/* JOURNEY */
var _fnManageZentralUser = function (ev) {
var user = ev.detail.user;
var isLogged = user != null;
log(“Mangiro.Marfeel > User Journey registration”, user);
if (!isLogged) return;
var isPremium = isLogged && (((user || {}).profile) || {}).premiumUser;
var userType = isPremium ? ‘3’ : ‘2’;
window.marfeel.cmd.push([‘compass’, function (compass) {
compass.setUserType(userType);
}]);
}
document.addEventListener(‘zentral-user-available’, _fnManageZentralUser);]]>
—-
https://historia.nationalgeographic.com.es/efemerides