Fix El Periodico de Catalunya

This commit is contained in:
magnolia1234 2023-11-24 12:00:33 +01:00
parent e3e3aca280
commit e2489a1119
6 changed files with 22 additions and 40 deletions

View file

@ -777,7 +777,6 @@ Grouped in options:\
[El Diario.es](https://www.eldiario.es) - [El Diario.es](https://www.eldiario.es) -
[El Español](https://www.elespanol.com) - [El Español](https://www.elespanol.com) -
[El País](https://elpais.com) - [El País](https://elpais.com) -
[El Periódico de Catalunya](https://www.elperiodico.com) -
[La Vanguardia](https://www.lavanguardia.com) - [La Vanguardia](https://www.lavanguardia.com) -
[Mundo Deportivo](https://www.mundodeportivo.com) - [Mundo Deportivo](https://www.mundodeportivo.com) -
[Política Exterior](https://www.politicaexterior.com) [Política Exterior](https://www.politicaexterior.com)
@ -789,6 +788,7 @@ Grouped in options:\
*Grupo Prensa Ibérica* sites like (opt-in to custom sites for unlisted)\ *Grupo Prensa Ibérica* sites like (opt-in to custom sites for unlisted)\
[Diario de Mallorca](https://www.diariodemallorca.es) - [Diario de Mallorca](https://www.diariodemallorca.es) -
[El Día](https://www.eldia.es) - [El Día](https://www.eldia.es) -
[El Periódico de Catalunya](https://www.elperiodico.com) -
[El Periódico de España](https://www.epe.es) - [El Periódico de España](https://www.epe.es) -
[Faro de Vigo](https://www.farodevigo.es) - [Faro de Vigo](https://www.farodevigo.es) -
[Información](https://www.informacion.es) - [Información](https://www.informacion.es) -

View file

@ -500,7 +500,7 @@ ext_api.storage.local.get({
} else { } else {
ext_api.management.getSelf(function (result) { ext_api.management.getSelf(function (result) {
if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) { if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) {
let new_groups = ['###_au_investsmart']; let new_groups = ['###_au_investsmart', '###_es_epiberica'];
let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain))); let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain)));
if (open_options) if (open_options)
ext_api.runtime.openOptionsPage(); ext_api.runtime.openOptionsPage();

View file

@ -8,6 +8,7 @@ Add Jazzwise
Add Tagesspiegel.de (link to archive.is) Add Tagesspiegel.de (link to archive.is)
Add Tiroler Tageszeitung Add Tiroler Tageszeitung
Remove Madavor Media (domains obsolete) Remove Madavor Media (domains obsolete)
Fix El Periodico de Catalunya (Grupo Prensa Iberica)
Fix Groupe Nice-Matin (css) Fix Groupe Nice-Matin (css)
Fix The Hill Times (ld_json_url) Fix The Hill Times (ld_json_url)
Update popup (fix toggle for custom flex sites) Update popup (fix toggle for custom flex sites)

View file

@ -18,7 +18,7 @@ var de_mhs_custom_domains = ['cannstatter-zeitung.de', 'esslinger-zeitung.de', '
var de_vrm_domains = ['allgemeine-zeitung.de', 'echo-online.de', 'wiesbadener-kurier.de']; var de_vrm_domains = ['allgemeine-zeitung.de', 'echo-online.de', 'wiesbadener-kurier.de'];
var de_vrm_custom_domains = ['buerstaedter-zeitung.de', 'hochheimer-zeitung.de', 'lampertheimer-zeitung.de', 'lauterbacher-anzeiger.de', 'main-spitze.de', 'mittelhessen.de', 'oberhessische-zeitung.de', 'wormser-zeitung.de']; var de_vrm_custom_domains = ['buerstaedter-zeitung.de', 'hochheimer-zeitung.de', 'lampertheimer-zeitung.de', 'lauterbacher-anzeiger.de', 'main-spitze.de', 'mittelhessen.de', 'oberhessische-zeitung.de', 'wormser-zeitung.de'];
var de_westfalen_medien_domains = ['muensterschezeitung.de', 'westfalen-blatt.de', 'wn.de']; var de_westfalen_medien_domains = ['muensterschezeitung.de', 'westfalen-blatt.de', 'wn.de'];
var es_epiberica_domains = ['diariodemallorca.es', 'eldia.es', 'epe.es', 'farodevigo.es', 'informacion.es', 'laprovincia.es', 'levante-emv.com', 'lne.es', 'mallorcazeitung.es']; var es_epiberica_domains = ['diariodemallorca.es', 'eldia.es', 'elperiodico.com', 'epe.es', 'farodevigo.es', 'informacion.es', 'laprovincia.es', 'levante-emv.com', 'lne.es', 'mallorcazeitung.es'];
var es_epiberica_custom_domains = ['diaridegirona.cat', 'diariocordoba.com', 'diariodeibiza.es', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info', 'laopinioncoruna.es', 'laopiniondemalaga.es', 'laopiniondemurcia.es', 'laopiniondezamora.es', 'regio7.cat']; var es_epiberica_custom_domains = ['diaridegirona.cat', 'diariocordoba.com', 'diariodeibiza.es', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info', 'laopinioncoruna.es', 'laopiniondemalaga.es', 'laopiniondemurcia.es', 'laopiniondezamora.es', 'regio7.cat'];
var es_grupo_vocento_domains = ['abc.es', 'diariosur.es', 'diariovasco.com', 'elcomercio.es', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'ideal.es', 'larioja.com', 'lasprovincias.es', 'laverdad.es', 'lavozdigital.es']; var es_grupo_vocento_domains = ['abc.es', 'diariosur.es', 'diariovasco.com', 'elcomercio.es', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'ideal.es', 'larioja.com', 'lasprovincias.es', 'laverdad.es', 'lavozdigital.es'];
var es_unidad_domains = ['elmundo.es', 'expansion.com', 'marca.com']; var es_unidad_domains = ['elmundo.es', 'expansion.com', 'marca.com'];
@ -1507,34 +1507,6 @@ else if (matchDomain('elpais.com')) {
} }
} }
else if (matchDomain('elperiodico.com')) {
let url = window.location.href;
if (!url.includes('amp.elperiodico.com')) {
let div_hidden = document.querySelector('div.closed');
if (div_hidden)
div_hidden.classList.remove('closed');
else {
let paywall = document.querySelector('.ep-masPeriodico-info-login');
removeDOMElement(paywall);
if (paywall)
window.location.href = url.replace('www.', 'amp.');
}
} else {
let not_logged = document.querySelector('.ep-masPeriodico-info-login');
if (not_logged) {
removeDOMElement(not_logged);
amp_unhide_access_hide('^="logged"', '^="NOT logged"');
}
window.setTimeout(function () {
let amp_img = document.querySelectorAll('amp-img > img');
for (let elem of amp_img) {
if (elem.src)
elem.src = elem.src.replace('amp.elperiodico.com/clip/', 'estaticos-cdn.elperiodico.com/clip/');
}
}, 3000);
}
}
else if (matchDomain(es_grupo_vocento_domains)) { else if (matchDomain(es_grupo_vocento_domains)) {
let paywall_sel = '.voc-paywall, .container-wall-exclusive, .cierre-suscripcion:not([style*="display: none;"])'; let paywall_sel = '.voc-paywall, .container-wall-exclusive, .cierre-suscripcion:not([style*="display: none;"])';
let paywall = document.querySelector(paywall_sel); let paywall = document.querySelector(paywall_sel);
@ -1559,10 +1531,17 @@ else if (matchDomain(es_epiberica_domains) || matchDomain(es_epiberica_custom_do
if (truncated) if (truncated)
truncated.classList.remove('article-body--truncated'); truncated.classList.remove('article-body--truncated');
amp_unhide_access_hide('="NOT access"], [amp-access="FALSE"', '="access"'); amp_unhide_access_hide('="NOT access"], [amp-access="FALSE"', '="access"');
} else if (window.location.hostname === 'amp.epe.es') { } else if (['amp.elperiodico.com', 'amp.epe.es'].includes(window.location.hostname)) {
amp_unhide_access_hide('="loggedIn"', '="NOT loggedIn"', 'amp-ad, amp-embed, amp-next-page'); amp_unhide_access_hide('="loggedIn"', '="NOT loggedIn"', 'amp-ad, amp-embed, amp-next-page');
let amp_images = document.querySelectorAll('div > amp-img[src]');
for (let amp_image of amp_images) {
let elem = document.createElement('img');
elem.src = amp_image.getAttribute('src');
elem.style = 'margin: 0px 50px;';
amp_image.parentNode.replaceChild(elem, amp_image);
}
} else { } else {
let ads = document.querySelectorAll('div.commercial-up-full__wrapper, div.sidebar--sticky__space, div[data-bbnx-id*="cxense"]'); let ads = document.querySelectorAll('div.commercial-up-full__wrapper, div.sidebar--sticky__space, div[data-bbnx-id*="cxense"], div.container-ad');
hideDOMElement(...ads); hideDOMElement(...ads);
} }
} }
@ -2976,8 +2955,8 @@ else if (matchDomain('prospectmagazine.co.uk')) {
} }
else if (matchDomain('spectator.co.uk')) { else if (matchDomain('spectator.co.uk')) {
let banner = document.querySelector('#subscribe-ribbon'); let banners = document.querySelectorAll('#subscribe-ribbon, div.ad-slot');
removeDOMElement(banner); hideDOMElement(...banners);
} }
else if (matchDomain('stylist.co.uk')) { else if (matchDomain('stylist.co.uk')) {

View file

@ -71,6 +71,7 @@
"Brusselstimes.com": { "Brusselstimes.com": {
"allow_cookies": 1, "allow_cookies": 1,
"block_regex": "\\.piano\\.io\\/xbuilder\\/experience\\/execute", "block_regex": "\\.piano\\.io\\/xbuilder\\/experience\\/execute",
"cs_code": "[{\"cond\":\"div[style*='height: 0;']\", \"rm_attrib\":\"style\"}]",
"domain": "brusselstimes.com" "domain": "brusselstimes.com"
}, },
"Bt.no": { "Bt.no": {
@ -451,6 +452,11 @@
"domain": "mining-journal.com", "domain": "mining-journal.com",
"ld_json": "div.article-teaser|div.article-content>p" "ld_json": "div.article-teaser|div.article-content>p"
}, },
"Museumsassociation.org": {
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"body.paywall\", \"rm_class\":\"paywall\", \"elems\":[{\"cond\":\"body[style]\", \"rm_attrib\":\"style\"}, {\"cond\":\"div#paywall-wrapper,div.advertising\", \"rm_elem\":1}]}]",
"domain": "museumsassociation.org"
},
"Nacion.com": { "Nacion.com": {
"allow_cookies": 1, "allow_cookies": 1,
"block_regex": "\\.tinypass\\.com", "block_regex": "\\.tinypass\\.com",

View file

@ -596,11 +596,6 @@ var defaultSites = {
allow_cookies: 1, allow_cookies: 1,
block_regex: /(\.elpais\.com\.uy\/user\/authStatus|\.evolok\.net\/|cdn\.cxense\.com\/)/ block_regex: /(\.elpais\.com\.uy\/user\/authStatus|\.evolok\.net\/|cdn\.cxense\.com\/)/
}, },
"El Periódico (de Catalunya)": {
domain: "elperiodico.com",
allow_cookies: 1,
block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/
},
"El Tiempo": { "El Tiempo": {
domain: "eltiempo.com", domain: "eltiempo.com",
allow_cookies: 1, allow_cookies: 1,
@ -942,6 +937,7 @@ var defaultSites = {
group: [ group: [
"diariodemallorca.es", "diariodemallorca.es",
"eldia.es", "eldia.es",
"elperiodico.com",
"epe.es", "epe.es",
"farodevigo.es", "farodevigo.es",
"informacion.es", "informacion.es",