Add Welt.de (link to archive.is)

This commit is contained in:
magnolia1234 2022-11-30 08:56:21 +01:00
parent cde747b8f7
commit b03c048b76
6 changed files with 36 additions and 38 deletions

View File

@ -517,6 +517,7 @@ Grouped in options:\
[Der Spiegel (link to archive.is)](https://www.spiegel.de) -
[Der Tagesspiegel (link to archive.is)](https://www.tagesspiegel.de) -
[Die Rheinpfalz](https://www.rheinpfalz.de) -
[Die Welt (link to archive.is)](https://www.welt.de) -
[Die Zeit](https://www.zeit.de) -
[Frankfurter Allgemeine Zeitung](https://www.faz.net) -
[Freie Presse](https://www.freiepresse.de) -

View File

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Welt.de (link to archive.is)
Remove BusinessPost.ie (fix obsolete)
* v2.9.5.0 (2022-11-27)

View File

@ -9,7 +9,7 @@ var ca_gcm_domains = ['lesoleil.com'].concat(['latribune.ca', 'lavoixdelest.ca',
var ca_torstar_domains = ['niagarafallsreview.ca', 'stcatharinesstandard.ca', 'thepeterboroughexaminer.com', 'therecord.com', 'thespec.com', 'thestar.com', 'wellandtribune.ca'];
var de_funke_medien_domains = ['abendblatt.de', 'braunschweiger-zeitung.de', 'morgenpost.de', 'nrz.de', 'otz.de', 'thueringer-allgemeine.de', 'tlz.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', 'rnd.de'];
var de_madsack_custom_domains = ['aller-zeitung.de', 'dnn.de', 'gnz.de', 'goettinger-tageblatt.de', 'paz-online.de', 'sn-online.de', 'waz-online.de'];
var de_madsack_custom_domains = ['aller-zeitung.de', 'dnn.de', 'gnz.de', 'goettinger-tageblatt.de', 'op-marburg.de', 'paz-online.de', 'sn-online.de', 'waz-online.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_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'];
@ -50,7 +50,7 @@ function getArticleJsonScript() {
let scripts = document.querySelectorAll('script[type="application/ld+json"]');
let json_script;
for (let script of scripts) {
if (script.innerText.includes('articleBody')) {
if (script.innerText.match(/"(articleBody|text)":/)) {
json_script = script;
break;
}
@ -72,13 +72,18 @@ if ((bg2csData !== undefined) && bg2csData.ld_json && dompurify_loaded) {
removeDOMElement(...paywall);
let json_script = getArticleJsonScript();
if (json_script) {
let json_text = parseHtmlEntities(JSON.parse(json_script.text).articleBody);
let content = document.querySelector(article_sel);
if (json_text && content) {
let parser = new DOMParser();
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(json_text) + '</div>', 'text/html');
let content_new = doc.querySelector('div');
content.parentNode.replaceChild(content_new, content);
try {
let json = JSON.parse(json_script.text);
let json_text = parseHtmlEntities(json.articleBody ? json.articleBody : json.text);
let content = document.querySelector(article_sel);
if (json_text && content) {
let parser = new DOMParser();
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(json_text) + '</div>', 'text/html');
let content_new = doc.querySelector('div');
content.parentNode.replaceChild(content_new, content);
}
} catch (err) {
console.log(err);
}
}
}
@ -747,6 +752,19 @@ else if (matchDomain('tagesspiegel.de')) {
}
}
else if (matchDomain('welt.de')) {
let url = window.location.href;
let paywall = document.querySelector('div[data-premium-content-loader-id^="spinner-article-"]');
if (paywall) {
removeDOMElement(paywall);
let article = document.querySelector('div[data-qa="Article.PremiumContent"]');
if (article)
article.insertBefore(archiveLink(url), article.firstChild);
}
let ads = document.querySelectorAll('div[data-component="Outbrain"], div[data-component="OEmbedComponent"], div[class*="c-ad"]');
removeDOMElement(...ads);
}
else if (matchDomain(de_westfalen_medien_domains)) {
let url = window.location.href;
if (url.includes('/amp/')) {

View File

@ -668,6 +668,7 @@
"*://*.waz.de/*",
"*://*.weeklytimesnow.com.au/*",
"*://*.wellandtribune.ca/*",
"*://*.welt.de/*",
"*://*.weltkunst.de/*",
"*://*.westernadvocate.com.au/*",
"*://*.westfalen-blatt.de/*",
@ -730,5 +731,5 @@
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.9.5.0"
"version": "2.9.5.1"
}

View File

@ -389,6 +389,10 @@ var defaultSites = {
allow_cookies: 1,
useragent: "googlebot"
},
"Die Welt (link to archive.is)": {
domain: "welt.de",
allow_cookies: 1
},
"Die Zeit": {
domain: "zeit.de",
allow_cookies: 1,
@ -2390,4 +2394,4 @@ init_custom_domains();
// sites with no fix (background)
var be_mediahuis_nofix_domains = ['gva.be', 'hbvl.be'];
var it_gedi_nofix_domains = ['gelocal.it', 'huffingtonpost.it', 'ilsecoloxix.it', 'lastampa.it', 'limesonline.com'];
var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'courrierinternational.com', 'dn.no', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'handelsblatt.com', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kurier.at', 'lavie.fr', 'lavozdegalicia.es', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'letemps.ch', 'liberation.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'ouest-france.fr', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'saechsische.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'tagesanzeiger.ch', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'welt.de', 'weser-kurier.de', 'worldpoliticsreview.com', 'ynet.co.il', 'zerohedge.com'].concat(be_mediahuis_nofix_domains, it_gedi_nofix_domains);
var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'courrierinternational.com', 'dn.no', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'handelsblatt.com', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kurier.at', 'lavie.fr', 'lavozdegalicia.es', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'letemps.ch', 'liberation.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'ouest-france.fr', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'tagesanzeiger.ch', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'weser-kurier.de', 'worldpoliticsreview.com', 'ynet.co.il', 'zerohedge.com'].concat(be_mediahuis_nofix_domains, it_gedi_nofix_domains);

View File

@ -1,31 +1,4 @@
{
"CNBC": {
"domain": "cnbc.com",
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com\\/",
"cs_code": [{
"cond": "div.ArticleGate-proGate",
"rm_elem": 1,
"elems": [{
"cond": "span[hidden]",
"rm_attrib": "class"
}, {
"cond": "span[hidden]",
"rm_attrib": "hidden"
}
]
}],
"new_site": 1
},
"Dagens ETC": {
"domain": "etc.se",
"allow_cookies": 1,
"cs_code": [{
"cond": "div.paywalled",
"rm_attrib": "class"
}],
"new_site": 1
},
"La Vanguardia": {
"domain": "lavanguardia.com",
"allow_cookies": 1,