From 24835e5e97c6dd06066e5814b745550f70e1dd04 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 28 Jun 2022 17:48:17 +0200 Subject: [PATCH] Fix Automobilwoche --- changelog.txt | 1 + contentScript.js | 10 ++++++++++ sites.js | 2 +- sites_updated.json | 5 +++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index cf3a956..acd8acc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add BQ Prime (former Bloomberg Quint) Remove Deutsche Wirtschafts Nachrichten (fix obsolete) +Fix Automobilwoche Fix Financial Times (cookie-banner) Fix Groupe SudOuest.fr Fix Knack.be & LeVif.be diff --git a/contentScript.js b/contentScript.js index 92f8b18..42e33d2 100644 --- a/contentScript.js +++ b/contentScript.js @@ -446,6 +446,16 @@ else if (matchDomain('augsburger-allgemeine.de')) { } } +else if (matchDomain('automobilwoche.de')) { + let lazy_images = document.querySelectorAll('img.lazy[data-src]'); + for (let lazy_image of lazy_images) { + lazy_image.src = lazy_image.getAttribute('data-src'); + lazy_image.removeAttribute('class'); + } + let lazy_sources = document.querySelectorAll('source[srcset^="data:image"]'); + removeDOMElement(...lazy_sources); +} + else if (matchDomain('berliner-zeitung.de')) { let url = window.location.href; let paywall = document.querySelector('.paywall-dialog-box'); diff --git a/sites.js b/sites.js index 2612b19..a35c0a3 100644 --- a/sites.js +++ b/sites.js @@ -166,7 +166,7 @@ var defaultSites = { "Automobilwoche": { domain: "automobilwoche.de", allow_cookies: 1, - block_regex: /\.amazonaws\.com\/s3fs-public\/js\/js_.+\.js/ + block_regex: /\.automobilwoche\.de\/s3fs-public\/js\/js_.+\.js/ }, "Badische Neueste Nachrichten": { allow_cookies: 1, diff --git a/sites_updated.json b/sites_updated.json index 34e3028..029e9d1 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -3,6 +3,11 @@ "domain": "artforum.com", "new_site": 1 }, + "Automobilwoche": { + "domain": "automobilwoche.de", + "allow_cookies": 1, + "block_regex": "\\.automobilwoche\\.de\\/s3fs-public\\/js\\/js_.+\\.js" + }, "BQ Prime": { "domain": "bqprime.com", "allow_cookies": 1,