Add Welt.de

master
magnolia1234 2022-08-06 07:49:13 +02:00
parent 8e8a6633d3
commit b8985273bf
7 changed files with 43 additions and 12 deletions

View File

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

View File

@ -6,7 +6,7 @@ var ext_name = manifestData.name;
var ext_version = manifestData.version; var ext_version = manifestData.version;
const cs_limit_except = ['elespanol.com', 'faz.net', 'nation.africa', 'nationalgeographic.com', 'thetimes.co.uk'].concat(de_westfalen_medien_domains); const cs_limit_except = ['elespanol.com', 'faz.net', 'nation.africa', 'nationalgeographic.com', 'thetimes.co.uk'].concat(de_westfalen_medien_domains);
const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'golem.de', 'hs.fi', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lesechos.fr', 'limburger.nl', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'spiegel.de', 'stratfor.com', 'tagesspiegel.de', 'techinasia.com', 'thetimes.co.uk', 'timesofindia.com', 'vn.nl'].concat(be_mediahuis_domains, nl_mediahuis_region_domains, no_nhst_media_domains); const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'golem.de', 'hs.fi', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lesechos.fr', 'limburger.nl', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'spiegel.de', 'stratfor.com', 'tagesspiegel.de', 'techinasia.com', 'thetimes.co.uk', 'timesofindia.com', 'vn.nl', 'welt.de'].concat(be_mediahuis_domains, nl_mediahuis_region_domains, no_nhst_media_domains);
var currentTabUrl = ''; var currentTabUrl = '';
var csDone = false; var csDone = false;
var optin_setcookie = false; var optin_setcookie = false;
@ -24,7 +24,6 @@ var restrictions = {
'faz.net': /^((?!\.faz\.net\/aktuell\/(\?switchfaznet)?$).)*$/, 'faz.net': /^((?!\.faz\.net\/aktuell\/(\?switchfaznet)?$).)*$/,
'globo.com': /^((?!\/valor\.globo\.com\/).)*$/, 'globo.com': /^((?!\/valor\.globo\.com\/).)*$/,
'lastampa.it': /^((?!\/video\.lastampa\.it\/).)*$/, 'lastampa.it': /^((?!\/video\.lastampa\.it\/).)*$/,
'theatlantic.com': /^((?!\/newsletters\.theatlantic\.com\/).)*$/,
'nytimes.com': /^((?!\/timesmachine\.nytimes\.com\/).)*$/, 'nytimes.com': /^((?!\/timesmachine\.nytimes\.com\/).)*$/,
'science.org': /^((?!\.science\.org\/doi\/).)*$/, 'science.org': /^((?!\.science\.org\/doi\/).)*$/,
'standaard.be': /^((?!\.standaard\.be\/plus\/).)*$/, 'standaard.be': /^((?!\.standaard\.be\/plus\/).)*$/,
@ -34,6 +33,7 @@ var restrictions = {
'seekingalpha.com': /\/seekingalpha\.com($|\/($|(amp\/)?(article|news)\/|samw\/))/, 'seekingalpha.com': /\/seekingalpha\.com($|\/($|(amp\/)?(article|news)\/|samw\/))/,
'statista.com': /^((?!\.statista\.com\/(outlook|study)\/).)*$/, 'statista.com': /^((?!\.statista\.com\/(outlook|study)\/).)*$/,
'techinasia.com': /\.techinasia\.com\/.+/, 'techinasia.com': /\.techinasia\.com\/.+/,
'theatlantic.com': /^((?!\/newsletters\.theatlantic\.com\/).)*$/,
'timeshighereducation.com': /\.timeshighereducation\.com\/((features|news|people)\/|.+((\w)+(\-)+){3,}.+|sites\/default\/files\/)/ 'timeshighereducation.com': /\.timeshighereducation\.com\/((features|news|people)\/|.+((\w)+(\-)+){3,}.+|sites\/default\/files\/)/
} }

View File

@ -5,6 +5,7 @@ Post-release
Add Limburger.nl Add Limburger.nl
Add Standaard.be Add Standaard.be
Add SuomenSotilas.fi Add SuomenSotilas.fi
Add Welt.de
Fix Australian Community Media (css) Fix Australian Community Media (css)
Fix Spiegel.de (Google webcache) Fix Spiegel.de (Google webcache)
Add Tagesspiegel.de Add Tagesspiegel.de

View File

@ -720,12 +720,12 @@ else if (matchDomain('spiegel.de')) {
csDoneOnce = true; csDoneOnce = true;
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0]; let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0];
replaceDomElementExt(url_cache, true, false, 'div[data-area="body"]'); replaceDomElementExt(url_cache, true, false, 'div[data-area="body"]');
window.setTimeout(function () { window.setTimeout(function () {
let lazy_images = document.querySelectorAll('img.lazyload[src^="data:image/"][data-src]'); let lazy_images = document.querySelectorAll('img.lazyload[src^="data:image/"][data-src]');
for (let elem of lazy_images) { for (let elem of lazy_images) {
elem.src = elem.getAttribute('data-src'); elem.src = elem.getAttribute('data-src');
} }
}, 1000); }, 1000);
} }
} }
@ -740,6 +740,30 @@ 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);
csDoneOnce = true;
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0];
replaceDomElementExt(url_cache, true, false, 'div[itemprop="articleBody"]');
window.setTimeout(function () {
let lazy_images = document.querySelectorAll('img[src*="/lazy-picture-placeholder-"][data-src]');
for (let elem of lazy_images) {
let source = elem.parentNode.querySelector('source[data-breakpoint="Large"][data-src-template]');
if (source)
elem.src = source.getAttribute('data-src-template');
else
elem.src = elem.getAttribute('data-src');
}
let teaser = document.querySelector('div[data-qa="Article.PremiumContent"] > div.c-article-text');
let ads = document.querySelectorAll('div[data-component="Outbrain"], div[data-component="OEmbedComponent"]');
removeDOMElement(teaser, ...ads);
}, 1500);
}
}
else if (matchDomain(de_westfalen_medien_domains)) { else if (matchDomain(de_westfalen_medien_domains)) {
let url = window.location.href; let url = window.location.href;
if (url.includes('/amp/')) { if (url.includes('/amp/')) {
@ -4238,7 +4262,7 @@ function replaceDomElementExtSrc(url, html, proxy, base64, selector, text_fail =
} }
let parser = new DOMParser(); let parser = new DOMParser();
window.setTimeout(function () { window.setTimeout(function () {
let doc = parser.parseFromString(DOMPurify.sanitize(html, {ADD_ATTR: ['layout'], ADD_TAGS: ['amp-img']}), 'text/html'); let doc = parser.parseFromString(DOMPurify.sanitize(html, {ADD_ATTR: ['layout', 'itemprop'], ADD_TAGS: ['amp-img']}), 'text/html');
//console.log(DOMPurify.removed); //console.log(DOMPurify.removed);
let article_new = doc.querySelector(selector_source); let article_new = doc.querySelector(selector_source);
if (article_new) { if (article_new) {

View File

@ -43,5 +43,5 @@
"webRequestBlocking", "webRequestBlocking",
"<all_urls>" "<all_urls>"
], ],
"version": "2.7.8.6" "version": "2.7.8.7"
} }

View File

@ -627,6 +627,7 @@
"*://*.waz.de/*", "*://*.waz.de/*",
"*://*.weeklytimesnow.com.au/*", "*://*.weeklytimesnow.com.au/*",
"*://*.wellandtribune.ca/*", "*://*.wellandtribune.ca/*",
"*://*.welt.de/*",
"*://*.westernadvocate.com.au/*", "*://*.westernadvocate.com.au/*",
"*://*.westfalen-blatt.de/*", "*://*.westfalen-blatt.de/*",
"*://*.winnipegfreepress.com/*", "*://*.winnipegfreepress.com/*",
@ -688,5 +689,5 @@
"*://gcm.omerlocdn.com/*", "*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "2.7.8.6" "version": "2.7.8.7"
} }

View File

@ -355,6 +355,10 @@ var defaultSites = {
allow_cookies: 1, allow_cookies: 1,
useragent: "googlebot" useragent: "googlebot"
}, },
"Die Welt": {
domain: "welt.de",
allow_cookies: 1
},
"Die Zeit": { "Die Zeit": {
domain: "zeit.de", domain: "zeit.de",
allow_cookies: 1, allow_cookies: 1,
@ -2160,4 +2164,4 @@ var no_nhst_media_domains = grouped_sites['###_no_nhst_media'];
// sites with no fix (background) // sites with no fix (background)
var nl_dpg_media_nofix_domains = ['ad.nl', 'bd.nl', 'bndestem.nl', 'destentor.nl', 'ed.nl', 'gelderlander.nl', 'hln.be', 'pzc.nl', 'tubantia.nl']; var nl_dpg_media_nofix_domains = ['ad.nl', 'bd.nl', 'bndestem.nl', 'destentor.nl', 'ed.nl', 'gelderlander.nl', 'hln.be', 'pzc.nl', 'tubantia.nl'];
var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'cnbc.com', 'courrierinternational.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'gazzetta.it', 'handelsblatt.com', 'hln.be', 'ilmanifesto.it', 'ilsole24ore.com', 'jacobinmag.com', 'jeunesafrique.com', 'kurier.at', 'lavozdegalicia.es', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'liberation.fr', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nieuwsblad.be', 'nknews.org', 'ouest-france.fr', 'politiken.dk', 'publico.pt', 'republic.ru', 'rp-online.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'sueddeutsche.de', 'tagesanzeiger.ch', 'the-ken.com', 'theinformation.com', ' themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'welt.de', 'wiwo.de', 'ynet.co.il'].concat(nl_dpg_media_nofix_domains); var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'cnbc.com', 'courrierinternational.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'gazzetta.it', 'handelsblatt.com', 'hln.be', 'ilmanifesto.it', 'ilsole24ore.com', 'jacobinmag.com', 'jeunesafrique.com', 'kurier.at', 'lavozdegalicia.es', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'liberation.fr', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nieuwsblad.be', 'nknews.org', 'ouest-france.fr', 'politiken.dk', 'publico.pt', 'republic.ru', 'rp-online.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'sueddeutsche.de', 'tagesanzeiger.ch', 'the-ken.com', 'theinformation.com', ' themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'wiwo.de', 'ynet.co.il'].concat(nl_dpg_media_nofix_domains);