Fix elDiario.es, El Espanol, Estadao.com.br, Grupo Abril & Folha de S. Paulo (amp)

This commit is contained in:
magnolia1234 2021-12-12 18:32:28 +01:00
parent 04bcbcec1f
commit a1e49fe901
3 changed files with 46 additions and 16 deletions

View file

@ -9,12 +9,13 @@ Fix Bloomberg Quint (bq blue)
Fix Inkl (images) Fix Inkl (images)
Fix Lecho.be (separate from Groupe Rossel) Fix Lecho.be (separate from Groupe Rossel)
Fix Repubblica sites (no amp) Fix Repubblica sites (no amp)
Fix amp: ABC.es Fix amp: ABC.es, elDiario.es & El Espanol
Fix amp: Artnet, Billboard, Digiday, Fortune, Lee Enterprises Group, Newsday, The Boston Globe, The Dallas Morning News & Vanity Fair Fix amp: Artnet, Billboard, Digiday, Fortune, Lee Enterprises Group, Newsday, The Boston Globe, The Dallas Morning News & Vanity Fair
Fix amp: Los Angeles Times & San Diego Union-Tribune Fix amp: Los Angeles Times & San Diego Union-Tribune
Fix amp: USA Today & Gannett Group Fix amp: USA Today & Gannett Group
Fix amp: Challenges.fr, Elle.fr, L'Opinion.fr & Science et Vie Fix amp: Challenges.fr, Elle.fr, L'Opinion.fr & Science et Vie
Fix amp: Corriere della Sera, Il Messaggero & Quotidiano.net Fix amp: Corriere della Sera, Il Messaggero & Quotidiano.net
Fix amp: Estadao.com.br, Grupo Abril & Folha de S. Paulo
Fix amp: ET Prime & LiveMint Fix amp: ET Prime & LiveMint
Fix amp: Funke Mediengruppe Fix amp: Funke Mediengruppe

View file

@ -681,10 +681,20 @@ else if (matchDomain('elconfidencial.com')) {
premium.classList.remove('newsType__content--closed'); premium.classList.remove('newsType__content--closed');
} }
else if (matchDomain('eldiario.es')) {
if (window.location.pathname.endsWith('.amp.html')) {
amp_unhide_access_hide('^="access"');
}
}
else if (matchDomain('elespanol.com')) { else if (matchDomain('elespanol.com')) {
if (window.location.pathname.endsWith('.amp.html')) {
amp_unhide_subscr_section('amp-ad, amp-embed');
} else {
let adverts = document.querySelectorAll('[id*="superior"], [class*="adv"]'); let adverts = document.querySelectorAll('[id*="superior"], [class*="adv"]');
removeDOMElement(...adverts); removeDOMElement(...adverts);
} }
}
else if (domain = matchDomain(es_unidad_domains)) { else if (domain = matchDomain(es_unidad_domains)) {
let premium = document.querySelector('.ue-c-article__premium'); let premium = document.querySelector('.ue-c-article__premium');
@ -797,6 +807,8 @@ else if (matchDomain('observador.pt')) {
let paywall = document.querySelector('.premium-article'); let paywall = document.querySelector('.premium-article');
if (paywall) if (paywall)
paywall.classList.remove('premium-article'); paywall.classList.remove('premium-article');
let amp_ads = document.querySelectorAll('amp-ad');
removeDOMElement(... amp_ads)
} }
else if (matchDomain('politicaexterior.com')) { else if (matchDomain('politicaexterior.com')) {
@ -1119,7 +1131,7 @@ else if (matchDomain(it_ilmessaggero_domains)) {
else if (matchDomain(it_quotidiano_domains)) { else if (matchDomain(it_quotidiano_domains)) {
if (window.location.pathname.endsWith('/amp')) { if (window.location.pathname.endsWith('/amp')) {
amp_unhide_access_hide('="c.customGranted"', '="NOT c.customGranted"'); amp_unhide_access_hide('="c.customGranted"', '="NOT c.customGranted"', 'amp-ad, amp-fx-flying-carpet');
} else { } else {
let detail_text_truncated = document.querySelector('div.detail-text--truncated'); let detail_text_truncated = document.querySelector('div.detail-text--truncated');
let detail_page_paywall = document.querySelector('body.detail-page--paywall'); let detail_page_paywall = document.querySelector('body.detail-page--paywall');
@ -1516,7 +1528,15 @@ else if (!matchDomain(['belfasttelegraph.co.uk', 'independent.ie']))
} else if (window.location.hostname.match(/\.(br|cl|pe)$/) || matchDomain(['elmercurio.com', 'latercera.com', 'lasegunda.com', 'valor.globo.com'])) {//south america } else if (window.location.hostname.match(/\.(br|cl|pe)$/) || matchDomain(['elmercurio.com', 'latercera.com', 'lasegunda.com', 'valor.globo.com'])) {//south america
if (matchDomain(['elcomercio.pe', 'gestion.pe'])) { if (matchDomain('abril.com.br')) {
if (window.location.pathname.endsWith('/amp/')) {
let paywall = document.querySelector('.piano-modal');
let amp_ads = document.querySelectorAll('amp-ad, amp-embed');
removeDOMElement(paywall, ...amp_ads);
}
}
else if (matchDomain(['elcomercio.pe', 'gestion.pe'])) {
let paywall = document.querySelector('.story-content__nota-premium'); let paywall = document.querySelector('.story-content__nota-premium');
if (paywall) { if (paywall) {
paywall.classList.remove('story-content__nota-premium'); paywall.classList.remove('story-content__nota-premium');
@ -1541,14 +1561,22 @@ else if (matchDomain('elmercurio.com')) {
} }
else if (matchDomain('estadao.com.br')) { else if (matchDomain('estadao.com.br')) {
if (window.location.pathname.endsWith('.amp')) {
amp_unhide_access_hide('="granted"', '="NOT granted"');
} else {
let paywall = document.getElementById('paywall-wrapper-iframe-estadao'); let paywall = document.getElementById('paywall-wrapper-iframe-estadao');
removeDOMElement(paywall); removeDOMElement(paywall);
} }
}
else if (matchDomain('folha.uol.com.br')) { else if (matchDomain('folha.uol.com.br')) {
if (window.location.pathname.startsWith('/amp/')) {
amp_unhide_subscr_section('amp-ad, amp-sticky-ad, amp-embed');
} else {
let signup = document.querySelector('.c-top-signup'); let signup = document.querySelector('.c-top-signup');
removeDOMElement(signup); removeDOMElement(signup);
} }
}
else if (matchDomain('latercera.com')) { else if (matchDomain('latercera.com')) {
let subscr_banner = document.querySelector('.empty'); let subscr_banner = document.querySelector('.empty');

View file

@ -348,12 +348,13 @@ var defaultSites = {
block_regex: /\.tinypass\.com\// block_regex: /\.tinypass\.com\//
}, },
"El Diario.es": { "El Diario.es": {
domain: "eldiario.es" domain: "eldiario.es",
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent)-.+\.js/
}, },
"El Español": { "El Español": {
domain: "elespanol.com", domain: "elespanol.com",
allow_cookies: 1, allow_cookies: 1,
block_regex: /\.eestatic\.com\/assets_js\/web\/v\d\/historia.*\.min\.js/ block_regex: /(\.eestatic\.com\/assets_js\/web\/v\d\/historia.*\.min\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent|subscriptions)-.+\.js)/
}, },
"El Mercurio": { "El Mercurio": {
domain: "elmercurio.com", domain: "elmercurio.com",
@ -443,7 +444,7 @@ var defaultSites = {
"blogfolha.uol.com.br" "blogfolha.uol.com.br"
], ],
allow_cookies: 1, allow_cookies: 1,
block_regex: /(\.folha\.uol\.com\.br\/paywall\/js\/.+\/publicidade\.ads\.js|paywall\.folha\.uol\.com\.br\/|js\.matheranalytics\.com\/)/ block_regex: /(\.folha\.uol\.com\.br\/paywall\/js\/.+\/publicidade\.ads\.js|paywall\.folha\.uol\.com\.br\/|js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-((sticky-)?ad|subscriptions)-.+\.js)/
}, },
"Follow the Money (ftm.nl)": { "Follow the Money (ftm.nl)": {
domain: "ftm.nl", domain: "ftm.nl",
@ -595,7 +596,7 @@ var defaultSites = {
"Grupo Abril": { "Grupo Abril": {
domain: "abril.com.br", domain: "abril.com.br",
allow_cookies: 1, allow_cookies: 1,
block_regex: /\.abril\.com\.br\/.+\/abril-paywall\/js\/abril-paywall\.js/ block_regex: /(\.abril\.com\.br\/.+\/abril-paywall\/js\/abril-paywall\.js|cdn\.ampproject\.org\/v\d\/amp-((sticky-)?ad|subscriptions)-.+\.js)/
}, },
"Grupo Prensa Ibérica": { "Grupo Prensa Ibérica": {
domain: "###_es_epiberica", domain: "###_es_epiberica",
@ -1115,7 +1116,7 @@ var defaultSites = {
}, },
"O Estado de S. Paulo": { "O Estado de S. Paulo": {
domain: "estadao.com.br", domain: "estadao.com.br",
block_regex: /acesso\.estadao\.com\.br\/paywall\/.+\/.+\.js/ block_regex: /(acesso\.estadao\.com\.br\/paywall\/.+\/.+\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent|fx-flying-carpet)-.+\.js)/
}, },
"O Globo (& Valor Econômico)": { "O Globo (& Valor Econômico)": {
domain: "globo.com", domain: "globo.com",
@ -1124,7 +1125,7 @@ var defaultSites = {
"Observador.pt": { "Observador.pt": {
domain: "observador.pt", domain: "observador.pt",
allow_cookies: 1, allow_cookies: 1,
block_regex: /\.tinypass\.com\// block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-((sticky-)?ad|subscriptions)-.+\.js)/
}, },
"Palo Alto Online": { "Palo Alto Online": {
domain: "paloaltoonline.com" domain: "paloaltoonline.com"
@ -1182,7 +1183,7 @@ var defaultSites = {
"quotidiano.net" "quotidiano.net"
], ],
allow_cookies: 1, allow_cookies: 1,
block_regex: /(cdn\.cxense\.com\/|\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent)-.+\.js)/ block_regex: /(cdn\.cxense\.com\/|\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent|fx-flying-carpet)-.+\.js)/
}, },
"Reuters": { "Reuters": {
domain: "reuters.com", domain: "reuters.com",