Aggiunta gestione ansa.it mobile
This commit is contained in:
parent
3561013e1f
commit
bcc20ae643
@ -13,14 +13,24 @@
|
|||||||
// Switch to the correct host
|
// Switch to the correct host
|
||||||
switch(window.location.hostname){
|
switch(window.location.hostname){
|
||||||
case "www.ansa.it":
|
case "www.ansa.it":
|
||||||
var ci = setInterval( function(){
|
var ci = setInterval( function(){
|
||||||
var cookiewall = document.querySelector('.prompt-to-accept');
|
var cookiewall_desktop = document.querySelector('.prompt-to-accept');
|
||||||
|
var cookiewall_mobile = document.querySelector('#iubenda-cs-banner');
|
||||||
|
|
||||||
if (cookiewall) {
|
// Cookiewall desktop
|
||||||
cookiewall.style.display = 'none';
|
if (cookiewall_desktop) {
|
||||||
document.querySelector('html').classList.remove('show-prompt-to-accept');
|
cookiewall_desktop.style.display = 'none';
|
||||||
clearTimeout(ci);
|
document.querySelector('html').classList.remove('show-prompt-to-accept');
|
||||||
}
|
clearTimeout(ci);
|
||||||
}, 1000 );
|
}
|
||||||
break;
|
|
||||||
}
|
// 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;
|
||||||
|
}
|
Reference in New Issue
Block a user