Fix Spiegel.de (Google webcache)

This commit is contained in:
magnolia1234 2022-08-05 20:40:26 +02:00
parent 60014ba1eb
commit 9bfbfa69ef
4 changed files with 12 additions and 5 deletions

View file

@ -483,7 +483,7 @@ Grouped in options:\
[Badische Neueste Nachrichten](https://www.bnn.de) -
[Berliner Zeitung](https://www.berliner-zeitung.de) -
[Cicero](https://www.cicero.de) -
[Der Spiegel (link to archive.today)](https://www.spiegel.de) -
[Der Spiegel](https://www.spiegel.de) -
[Der Tagesspiegel](https://www.tagesspiegel.de) -
[Die Rheinpfalz](https://www.rheinpfalz.de) -
[Die Zeit](https://www.zeit.de) -

View file

@ -6,7 +6,7 @@ var ext_name = manifestData.name;
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 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', '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'].concat(be_mediahuis_domains, nl_mediahuis_region_domains, no_nhst_media_domains);
var currentTabUrl = '';
var csDone = false;
var optin_setcookie = false;

View file

@ -6,6 +6,7 @@ Add Limburger.nl
Add Standaard.be
Add SuomenSotilas.fi
Fix Australian Community Media (css)
Fix Spiegel.de (Google webcache)
Add Tagesspiegel.de
Fix The Athletic (css & amp)
Fix TheTimes.co.uk (Google webcache)

View file

@ -717,9 +717,15 @@ else if (matchDomain('spiegel.de')) {
let paywall = document.querySelector('div[data-area="paywall"]');
if (paywall) {
removeDOMElement(paywall);
let article = document.querySelector('div[data-area="body"]');
if (article)
article.insertBefore(archiveLink(url), article.firstChild);
csDoneOnce = true;
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0];
replaceDomElementExt(url_cache, true, false, 'div[data-area="body"]');
window.setTimeout(function () {
let lazy_images = document.querySelectorAll('img.lazyload[src^="data:image/"][data-src]');
for (let elem of lazy_images) {
elem.src = elem.getAttribute('data-src');
}
}, 1000);
}
}