Aggiunta gestione ansa.it mobile

This commit is contained in:
loviuz 2023-04-02 15:13:47 +02:00
parent 3561013e1f
commit bcc20ae643
1 changed files with 20 additions and 10 deletions

View File

@ -13,14 +13,24 @@
// Switch to the correct host
switch(window.location.hostname){
case "www.ansa.it":
var ci = setInterval( function(){
var cookiewall = document.querySelector('.prompt-to-accept');
var ci = setInterval( function(){
var cookiewall_desktop = document.querySelector('.prompt-to-accept');
var cookiewall_mobile = document.querySelector('#iubenda-cs-banner');
if (cookiewall) {
cookiewall.style.display = 'none';
document.querySelector('html').classList.remove('show-prompt-to-accept');
clearTimeout(ci);
}
}, 1000 );
break;
}
// Cookiewall desktop
if (cookiewall_desktop) {
cookiewall_desktop.style.display = 'none';
document.querySelector('html').classList.remove('show-prompt-to-accept');
clearTimeout(ci);
}
// Cookiewall mobile
if (cookiewall_mobile) {
document.querySelector('#iubenda-cs-banner.iubenda-cs-visible').classList.remove('iubenda-cs-visible');
document.querySelector('html').setAttribute('style', '');
document.querySelector('.adv-slot').style.display = 'none';
clearTimeout(ci);
}
}, 1000 );
break;
}