From 0fcc51486d863cd6861127aa18b58a3bd88928a9 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 22 Jul 2020 19:38:49 +0200 Subject: [PATCH] =?UTF-8?q?Add=20S=C3=BCddeutsche=20Zeitung=20(amp=20for?= =?UTF-8?q?=20plus)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- contentScript.js | 9 +++++++++ lp/manifest.json | 1 + sites.js | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c508cc..d8a2b6d 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,8 @@ Install add-on by downloading xpi-file. [Valeurs Actuelles](https://www.valeursactuelles.com) ##### Germany/Austria [Frankfurter Allgemeine Zeitung](https://www.faz.net) - -[Handelsblatt](https://www.handelsblatt.com) +[Handelsblatt](https://www.handelsblatt.com) - +[Süddeutsche Zeitung](https://www.sueddeutsche.de) ##### Italy [Corriere Della Sera](https://www.corriere.it) - [Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) - diff --git a/contentScript.js b/contentScript.js index 21c2c62..e215f47 100644 --- a/contentScript.js +++ b/contentScript.js @@ -863,6 +863,15 @@ else if (matchDomain("irishtimes.com")) { }); } +else if (matchDomain("sueddeutsche.de")) { + document.addEventListener('DOMContentLoaded', () => { + let reduced_par = document.querySelector('div.sz-article-body__paragraph--reduced'); + let url = window.location.href; + if (url.includes('reduced=true') || reduced_par) + window.location.href = url.split('?')[0].replace('www.', 'amphtml.'); + }); +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/lp/manifest.json b/lp/manifest.json index fb3cc78..a63268b 100644 --- a/lp/manifest.json +++ b/lp/manifest.json @@ -201,6 +201,7 @@ "*://*.spectator.com.au/*", "*://*.standard.net.au/*", "*://*.statista.com/*", + "*://*.sueddeutsche.de/*", "*://*.sun-sentinel.com/*", "*://*.switzersuperreport.com.au/*", "*://*.techinasia.com/*", diff --git a/sites.js b/sites.js index a52ce38..0eb7bb5 100644 --- a/sites.js +++ b/sites.js @@ -129,6 +129,7 @@ var defaultSites = "Slader": "slader.com", "SOFREP": "sofrep.com", "Statista": "statista.com", + "Süddeutsche Zeitung": "sueddeutsche.de", "SunSentinel": "sun-sentinel.com", "Switzer Report": "switzersuperreport.com.au", "Tech in Asia": "techinasia.com",