(adsbygoogle = window.adsbygoogle || []).push({});
Titolo
Please wait a few moments while we retrieve your link!
You will be able to continue to your link in 10 seconds.
(adsbygoogle = window.adsbygoogle || []).push({});
(function () {
const mappings = {
adBlockScript: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
criteoScript: 'https://static.criteo.net/flash/icon/privacy_small.svg',
};
let adBlockDetected = false;
const translations = {
en: {
title: 'Disable Adblock or Subscribe to a Plan!',
message: 'The free version of this service relies on ads. Disable the ad blocker extension and tracking protection or upgrade your plan to use the service without ads.',
buttonText: 'I\'ve disabled the blocker',
closeButton: 'Close',
},
it: {
title: 'Disabilita Adblock o sottoscrivi un Piano!',
message: 'La versione gratuita di questo servizio si basa sugli annunci. Disabilita l\'estensione di blocco annunci e la protezione del tracking o aggiorna il tuo piano per usufruire del servizio senza annunci.',
buttonText: 'Ho disabilitato il blocco',
closeButton: 'Chiudi',
},
// Aggiungi altre lingue se necessario
es: {
title: '¡Desactiva Adblock o suscrÃbete a un plan!',
message: 'La versión gratuita de este servicio se basa en anuncios. Desactiva la extensión de bloqueo de anuncios y la protección de seguimiento, o actualiza tu plan para disfrutar del servicio sin anuncios.',
buttonText: 'He desactivado el bloqueo',
closeButton: 'Cerrar',
},
fr: {
title: 'Désactivez Adblock ou abonnez-vous à un plan !',
message: "La version gratuite de ce service repose sur des annonces. Désactivez l'extension de blocage de publicités et la protection du suivi, ou mettez à jour votre abonnement pour profiter du service sans publicités.",
buttonText: "J'ai désactivé le blocage",
closeButton: 'Fermer',
},
de: {
title: 'Deaktivieren Sie Adblock oder abonnieren Sie einen Plan!',
message: 'Die kostenlose Version dieses Dienstes basiert auf Anzeigen. Deaktivieren Sie die Anzeigenblockierungserweiterung und den Tracking-Schutz oder aktualisieren Sie Ihren Plan, um den Service ohne Anzeigen zu nutzen.',
buttonText: 'Ich habe die Blockierung deaktiviert',
closeButton: 'Schließen',
},
};
const getUserLanguage = () => {
const userLang = navigator.language || navigator.userLanguage;
console.log('Lingua rilevata dal browser:', userLang);
return userLang.split('-')[0]; // Estrai solo la parte principale della lingua (es. 'it-IT' diventa 'it')
};
const createPopup = (language) => {
const overlay = createDivElement(`
`);
const popup = createDivElement(`
${translations[language].title}
${translations[language].message}
${translations[language].buttonText}
`);
const closeButton = createDivElement(`
${translations[language].closeButton}
`);
const closeButtonOriginal = popup.querySelector('button');
closeButtonOriginal.parentNode.insertBefore(closeButton, closeButtonOriginal);
closeButton.addEventListener('click', () => {
overlay.remove();
});
document.body.appendChild(overlay);
overlay.appendChild(popup);
};
const createDivElement = (html) => {
const div = document.createElement('div');
div.innerHTML = html;
return div.firstElementChild;
};
const loadScript = (src, callback) => {
const script = document.createElement('script');
script.src = src;
script.type = 'text/javascript';
script.charset = 'utf-8';
script.onload = script.onreadystatechange = () => {
if (!adBlockDetected && (!script.readyState || script.readyState === 'complete')) {
adBlockDetected = true;
callback();
}
};
script.onerror = () => {
callback();
};
document.getElementsByTagName('head')[0].appendChild(script);
};
const checkAdBlock = () => {
const promises = [
new Promise((resolve, reject) => {
if (document.getElementById('stndz-style')) {
reject();
} else {
resolve();
}
}),
new Promise((resolve, reject) => {
loadScript(mappings.adBlockScript, () => {