Add Rheinische Post Mediengruppe (only plus if amp)

This commit is contained in:
magnolia1234 2021-02-05 14:57:27 +01:00
parent a9a733db62
commit d312014941
6 changed files with 79 additions and 16 deletions

View file

@ -283,7 +283,13 @@ Madsack Mediengruppe sites like
[Lübecker Nachrichten](https://www.ln-online.de) -
[Märkische Allgemeine](https://www.maz-online.de) -
[Neue Presse (Hannover)](https://www.neuepresse.de) -
[Ostsee-Zeitung](https://www.ostsee-zeitung.de)
[Ostsee-Zeitung](https://www.ostsee-zeitung.de)\
Rheinische Post Mediengruppe like
[Aachener Nachrichten](https://www.aachener-nachrichten.de) -
[General-Anzeiger Bonn](https://ga.de) -
[Rheinische Post](https://rp-online.de) -
[Saarbrücker Zeitung](http://www.saarbruecker-zeitung.de) -
[Trierischer Volksfreund](http://www.volksfreund.de)
##### Italy
[Corriere Della Sera](https://www.corriere.it) -

View file

@ -335,6 +335,7 @@ const au_prov_news_domains = ['news-mail.com.au', 'frasercoastchronicle.com.au',
const ca_torstar_domains = ['niagarafallsreview.ca', 'stcatharinesstandard.ca', 'thepeterboroughexaminer.com', 'therecord.com', 'thespec.com', 'thestar.com', 'wellandtribune.ca'];
const de_funke_media_domains = ['abendblatt.de', 'braunschweiger-zeitung.de', 'morgenpost.de', 'nrz.de', 'otz.de', 'thueringer-allgemeine.de', 'waz.de', 'wp.de', 'wr.de'];
const de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'maz-online.de', 'neuepresse.de', 'ostsee-zeitung.de'];
const de_rp_medien_domains = ['aachener-nachrichten.de', 'ga.de', 'rp-online.de', 'saarbruecker-zeitung.de', 'volksfreund.de'];
const es_grupo_vocento_domains = ['diariosur.es', 'diariovasco.com', 'elcomercio.es', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'ideal.es', 'larioja.com', 'laverdad.es', 'lavozdigital.es'];
const fi_alma_talent_domains = ['arvopaperi.fi', 'kauppalehti.fi', 'marmai.fi', 'mediuutiset.fi', 'mikrobitti.fi', 'talouselama.fi', 'tekniikkatalous.fi', 'tivi.fi', 'uusisuomi.fi'];
const fr_be_groupe_rossel_domains = ['aisnenouvelle.fr', 'courrier-picard.fr', 'lardennais.fr', 'lavoixdunord.fr', 'lecho.be', 'lesoir.be', 'lest-eclair.fr', 'liberation-champagne.fr', 'lunion.fr', 'nordeclair.fr', 'paris-normandie.fr', 'sudinfo.be'];
@ -358,7 +359,7 @@ const userAgentMobileB = "Chrome/80.0.3987.92 Mobile Safari/537.36 (compatible;
var enabledSites = [];
var disabledSites = [];
var defaultSites_grouped_domains = Object.values(defaultSites);
var defaultSites_domains = defaultSites_grouped_domains.concat(au_comm_media_domains, au_news_corp_domains, au_prov_news_domains, ca_torstar_domains, de_funke_media_domains, de_madsack_domains, es_grupo_vocento_domains, fi_alma_talent_domains, fr_be_groupe_rossel_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_ilmessaggero_domains, nl_ad_region_domains, usa_nymag_domains);
var defaultSites_domains = defaultSites_grouped_domains.concat(au_comm_media_domains, au_news_corp_domains, au_prov_news_domains, ca_torstar_domains, de_funke_media_domains, de_madsack_domains, de_rp_medien_domains, es_grupo_vocento_domains, fi_alma_talent_domains, fr_be_groupe_rossel_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_ilmessaggero_domains, nl_ad_region_domains, usa_nymag_domains);
var customSites = {};
var customSites_domains = [];
var excludedSites = [];
@ -401,6 +402,7 @@ var grouped_sites = {
'###_ca_torstar': ca_torstar_domains,
'###_de_funke_medien': de_funke_media_domains,
'###_de_madsack': de_madsack_domains,
'###_de_rp_medien': de_rp_medien_domains,
'###_es_grupo_vocento': es_grupo_vocento_domains,
'###_fi_alma_talent': fi_alma_talent_domains,
'###_fr_be_groupe_rossel': fr_be_groupe_rossel_domains,
@ -451,6 +453,14 @@ function add_grouped_sites(init_rules) {
allow_cookies.push(domain);
blockedRegexes[domain] = /(cdn\.cxense\.com\/.+|\.tinypass\.com\/.+)/;
}
for (let domain of de_madsack_domains) {
allow_cookies.push(domain);
blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-(ad|subscriptions)-.+\.js/;
}
for (let domain of de_rp_medien_domains) {
allow_cookies.push(domain);
blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|fx-flying-carpet|subscriptions)-.+\.js/;
}
for (let domain of es_grupo_vocento_domains) {
allow_cookies.push(domain);
blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent|subscriptions)-.+\.js/;
@ -851,7 +861,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
let usa_mw_site = (matchUrlDomain('wsj.net', details.url) && matchUrlDomain('marketwatch.com', header_referer) && isSiteEnabled({url: header_referer}));
let bpc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && isSiteEnabled({url: header_referer}) &&
matchUrlDomain(['barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elmundo.es', 'elpais.com', 'elperiodico.com', 'expansion.com', 'freiepresse.de', 'fresnobee.com', 'gelocal.it', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'lne.es', 'marketwatch.com', 'nationalreview.com', 'sacbee.com', 'seekingalpha.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk'].concat(au_nine_domains, es_grupo_vocento_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains), header_referer));
matchUrlDomain(['barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elmundo.es', 'elpais.com', 'elperiodico.com', 'expansion.com', 'freiepresse.de', 'fresnobee.com', 'gelocal.it', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'lne.es', 'marketwatch.com', 'nationalreview.com', 'sacbee.com', 'seekingalpha.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk'].concat(au_nine_domains, de_madsack_domains, de_rp_medien_domains, es_grupo_vocento_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains), header_referer));
if (!isSiteEnabled(details) && !inkl_site && !au_nc_amp_site && !au_apn_site && !au_swm_site && !cl_elmerc_site && !medium_custom_domain && !uk_nlr_site && !usa_discmag_site && !usa_mw_site && !bpc_amp_site) {
return;

View file

@ -4,6 +4,8 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Diario de Ibiza/Mallorca, Faro de Vigo & La Provincia (Spain)
Add Le Un (France)
Rheinische Post Mediengruppe (only plus if amp)
Fix-update Madsack Mediengruppe (amp)
Fix-update Medium/Towards Data Science (login) & add custom domains in options
Fix-update Stratfor (style; not menu)

View file

@ -6,6 +6,7 @@ var csDone = false;
var ca_torstar_domains = ['niagarafallsreview.ca', 'stcatharinesstandard.ca', 'thepeterboroughexaminer.com', 'therecord.com', 'thespec.com', 'thestar.com', 'wellandtribune.ca'];
var de_funke_media_domains = ['abendblatt.de', 'braunschweiger-zeitung.de', 'morgenpost.de', 'nrz.de', 'otz.de', 'thueringer-allgemeine.de', 'waz.de', 'wp.de', 'wr.de'];
var de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'maz-online.de', 'neuepresse.de', 'ostsee-zeitung.de'];
var de_rp_medien_domains = ['aachener-nachrichten.de', 'ga.de', 'rp-online.de', 'saarbruecker-zeitung.de', 'volksfreund.de'];
var es_epiberica_domains = ['diariodeibiza.es', 'diariodemallorca.es', 'farodevigo.es', 'laprovincia.es'];
var es_grupo_vocento_domains = ['diariosur.es', 'diariovasco.com', 'elcomercio.es', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'ideal.es', 'larioja.com', 'laverdad.es', 'lavozdigital.es'];
var fr_groupe_ebra_domains = ['bienpublic.com', 'dna.fr', 'estrepublicain.fr', 'lalsace.fr', 'ledauphine.com', 'lejsl.com', 'leprogres.fr', 'republicain-lorrain.fr', 'vosgesmatin.fr'];
@ -1404,7 +1405,9 @@ else if (matchDomain("stocknews.com")) {
blurmes[i].setAttribute('id', 'blurmenot' + i);
}
else if (matchDomain(de_madsack_domains)) {
else if (domain = matchDomain(de_madsack_domains)) {
let url = window.location.href;
if (!url.includes(domain + '/amp/')) {
let paidcontent_intro = document.querySelector('div.pdb-article-body-paidcontentintro');
if (paidcontent_intro) {
paidcontent_intro.classList.remove('pdb-article-body-paidcontentintro');
@ -1418,6 +1421,13 @@ else if (matchDomain(de_madsack_domains)) {
let paidcontent_reg = document.querySelector('div.pdb-article-paidcontent-registration');
removeDOMElement(paidcontent_reg);
}
} else {
let subscr_sections = document.querySelectorAll('section[subscriptions-section="content"]');
for (let subscr_section of subscr_sections)
subscr_section.removeAttribute('subscriptions-section');
let amp_ads = document.querySelectorAll('pdb-ad-container');
removeDOMElement(...amp_ads);
}
}
else if (matchDomain("elpais.com")) {
@ -2047,6 +2057,35 @@ else if (matchDomain(es_epiberica_domains)) {
}, 500); // Delay (in milliseconds)
}
else if (matchDomain(de_rp_medien_domains)) {
let url = window.location.href;
let paywall_article = document.querySelector('article.park-article--reduced .park-icon-paid');
if (url.includes('?output=amp')) {
let subscr_sections = document.querySelectorAll('section[subscriptions-section="content"]');
for (let subscr_section of subscr_sections)
subscr_section.removeAttribute('subscriptions-section');
let amp_ads = document.querySelectorAll('amp-ad, amp-embed, amp-fx-flying-carpet');
removeDOMElement(...amp_ads);
} else {
let amphtml = document.querySelector('link[rel="amphtml"]');
if (paywall_article) {
if (amphtml) {
removeDOMElement(paywall_article);
window.location.href = amphtml.href;
} else {
let headline = document.querySelector('span.park-article__headline');
let bpc_amp_div = headline.querySelector('#bpc_amp');
if (!bpc_amp_div) {
let bpc_amp = document.createElement('div');
bpc_amp.id = 'bpc_amp';
bpc_amp.appendChild(document.createTextNode('-> bpc: no amp-bypass ...'));
headline.appendChild(bpc_amp);
}
}
}
}
}
else if (!matchDomain(['belfasttelegraph.co.uk', 'independent.ie']))
csDone = true;

View file

@ -43,6 +43,7 @@
"tabs",
"webRequest",
"webRequestBlocking",
"*://*.aachener-nachrichten.de/*",
"*://*.abc.es/*",
"*://*.abendblatt.de/*",
"*://*.ad.nl/*",
@ -156,6 +157,7 @@
"*://*.fresnobee.com/*",
"*://*.ft.com/*",
"*://*.ftm.nl/*",
"*://*.ga.de/*",
"*://*.geelongadvertiser.com.au/*",
"*://*.gelderlander.nl/*",
"*://*.gelocal.it/*",
@ -320,7 +322,9 @@
"*://*.republic.ru/*",
"*://*.republicain-lorrain.fr/*",
"*://*.rollingstone.com/*",
"*://*.rp-online.de/*",
"*://*.ruhrnachrichten.de/*",
"*://*.saarbruecker-zeitung.de/*",
"*://*.sacbee.com/*",
"*://*.saechsische.de/*",
"*://*.sandiegouniontribune.com/*",
@ -398,6 +402,7 @@
"*://*.valeursactuelles.com/*",
"*://*.vanityfair.com/*",
"*://*.variety.com/*",
"*://*.volksfreund.de/*",
"*://*.volkskrant.nl/*",
"*://*.vosgesmatin.fr/*",
"*://*.vulture.com/*",
@ -451,5 +456,5 @@
"*://*.userzoom.com/*",
"*://*.wsj.net/*"
],
"version": "2.0.6.4"
"version": "2.0.6.5"
}

View file

@ -173,6 +173,7 @@ var defaultSites =
"Piqd.de": "piqd.de",
"Pittsburgh Post Gazette": "post-gazette.com",
"Prospect Magazine": "prospectmagazine.co.uk",
"Rheinische Post Mediengruppe (only plus if amp)": "###_de_rp_medien",
"Quartz (free articles only)": "qz.com",
"Quora": "quora.com",
"Quotidiano.net": "quotidiano.net",