From 37ef82dca6c1fa9a6aed17c0b3653f2a3f9d84a3 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 22 Mar 2023 15:42:53 +0100 Subject: [PATCH] Fix Automobilwoche.de Remove Cellesche Zeitung --- README.md | 1 - background.js | 2 +- changelog.txt | 6 ++++-- contentScript.js | 16 ++-------------- contentScript_once_var.js | 12 +----------- custom/manifest.json | 2 +- manifest.json | 3 +-- options/optin/opt-in.html | 2 +- options/options.html | 7 +++---- options/options_all.css | 7 +++++-- sites.js | 6 +----- sites_updated.json | 5 +++++ 12 files changed, 25 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 95c93c7..ef5bc26 100644 --- a/README.md +++ b/README.md @@ -530,7 +530,6 @@ Grouped in options:\ [Automobilwoche](https://www.automobilwoche.de) - [Badische Neueste Nachrichten](https://www.bnn.de) - [Berliner Zeitung](https://www.berliner-zeitung.de) - -[Cellesche Zeitung](https://www.cz.de) - [Cicero](https://www.cicero.de) - [Der Spiegel (link to archive.is)](https://www.spiegel.de) - [Der Tagesspiegel (link to archive.is)](https://www.tagesspiegel.de) - diff --git a/background.js b/background.js index 0f2e322..cb101a5 100644 --- a/background.js +++ b/background.js @@ -823,7 +823,7 @@ if (typeof browser !== 'object') { } } - var set_var_sites = ['cz.de', 'nzherald.co.nz', 'theglobeandmail.com'].concat(de_madsack_domains); + var set_var_sites = ['nzherald.co.nz', 'theglobeandmail.com'].concat(de_madsack_domains); function runOnTab_once_var(tab) { let tabId = tab.id; let url = tab.url; diff --git a/changelog.txt b/changelog.txt index 485484b..a6b51f0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,8 @@ Changelog Bypass Paywalls Clean - Firefox Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases Post-release +Remove Cellesche Zeitung (fix obsolete) +Fix Automobilwoche.de Fix Faz.net (json) Fix Valor Economico (amp-redirect) @@ -464,7 +466,7 @@ Add BQ Prime (former Bloomberg Quint) Add ilTirreno.it Add Spiegel.de (link to archive.is) Remove Deutsche Wirtschafts Nachrichten (fix obsolete) -Fix Automobilwoche +Fix Automobilwoche.de Fix Financial Times (cookie-banner) Fix Groupe SudOuest.fr Fix Iltalehti.fi (videos) @@ -555,7 +557,7 @@ Update badge (site with no fix; X) Update block general paywall script (Pico/Wordpress) * v2.6.6.0 (2022-04-24) -Add Automobilwoche +Add Automobilwoche.de Add Better Nutrition, Gym Climber, Peloton, Podium Runner & Rock and Ice Add eNotes Add Italia Oggi diff --git a/contentScript.js b/contentScript.js index 180b975..eba42bd 100644 --- a/contentScript.js +++ b/contentScript.js @@ -573,16 +573,6 @@ 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')) { window.setTimeout(function () { let ads = document.querySelectorAll('[id^="traffective-ad"], [class^="ad-slot_wrapper"], [class^="outbrain_container"]'); @@ -2398,10 +2388,8 @@ else if (matchDomain('ft.com')) { if (window.location.hostname.startsWith('amp.')) { amp_unhide_subscr_section('.ad-container, amp-ad'); } else { - let cookie_banner = document.querySelector('.o-cookie-message'); - let ribbon = document.querySelector('.js-article-ribbon'); - let ads = document.querySelector('.o-ads'); - removeDOMElement(cookie_banner, ribbon, ads); + let banners = document.querySelectorAll('.o-cookie-message, .js-article-ribbon, .o-ads, .o-banner'); + removeDOMElement(...banners); } } diff --git a/contentScript_once_var.js b/contentScript_once_var.js index 563d43f..2849cc8 100644 --- a/contentScript_once_var.js +++ b/contentScript_once_var.js @@ -6,17 +6,7 @@ var de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'm if (hostname.match(/\.de$/)) { -if (matchDomain('cz.de')) { - function cz_unhide(node) { - removeDOMElement(node); - let article_not_allowed = document.querySelector('article.news-read-not-allowed'); - if (article_not_allowed) - article_not_allowed.classList.remove('news-read-not-allowed') - } - waitDOMElement('div#erasmo', 'DIV', cz_unhide); -} - -else if (matchDomain(de_madsack_domains) || document.querySelector('link[href*=".rndtech.de/"]')) { +if (matchDomain(de_madsack_domains) || document.querySelector('link[href*=".rndtech.de/"]')) { function madsack_main() { let done = false; for (let n = 0; n < 10; n++) { diff --git a/custom/manifest.json b/custom/manifest.json index 759d7bf..53a0f53 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.1.0.2" + "version": "3.1.0.3" } diff --git a/manifest.json b/manifest.json index 77b506b..ad2c0f0 100644 --- a/manifest.json +++ b/manifest.json @@ -169,7 +169,6 @@ "*://*.curbed.com/*", "*://*.cw.com.tw/*", "*://*.cyclingtips.com/*", - "*://*.cz.de/*", "*://*.dailyadvertiser.com.au/*", "*://*.dailyliberal.com.au/*", "*://*.dailypress.com/*", @@ -740,5 +739,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.1.0.2" + "version": "3.1.0.3" } diff --git a/options/optin/opt-in.html b/options/optin/opt-in.html index b353046..4a5aa0a 100644 --- a/options/optin/opt-in.html +++ b/options/optin/opt-in.html @@ -17,7 +17,7 @@

custom sites opt-in

-

If you want to enable custom sites and also have the option to remove cookies/block general paywall-scripts of 'non-listed' sites:
+

If you want to enable custom sites and also have the option to remove cookies/block general paywall-scripts of 'unlisted' sites:

custom sites enabled:

diff --git a/options/options.html b/options/options.html index 24a7e7d..d7ff261 100644 --- a/options/options.html +++ b/options/options.html @@ -10,10 +10,9 @@

Options |


Changelog
-
Most selected sites will have their cookies cleared (not all though).
- You should uncheck the sites (or add to excluded sites) for which you have an account or else you will be logged out at every visit.

- If you want to also block general paywall-scripts for non-listed sites you have to opt-in to custom sites (permission for access to all sites is needed).
- To view some sites (check list) a necessary cookie has to be set (enable this in opt-in). +
Some selected sites will have their cookies cleared; uncheck the sites (or add to excluded sites) for which you have an account or else you will be logged out at every visit.
+ If you also want to block general paywall-scripts for unlisted sites you have to opt-in to custom sites (host permission for access to all sites is needed). +

diff --git a/options/options_all.css b/options/options_all.css index e92fa74..428ab2e 100644 --- a/options/options_all.css +++ b/options/options_all.css @@ -11,8 +11,11 @@ a { color: black; } @media (prefers-color-scheme: dark) { + html { + color-scheme: dark; + } body, button, a, input, select, textarea { - background-color: #313131; - color: #bfbfbf; + background-color: #313131; + color: #bfbfbf; } } diff --git a/sites.js b/sites.js index 7482754..5112397 100644 --- a/sites.js +++ b/sites.js @@ -180,7 +180,7 @@ var defaultSites = { "Automobilwoche": { domain: "automobilwoche.de", allow_cookies: 1, - block_regex: /\.automobilwoche\.de\/s3fs-public\/js\/js_.+\.js/ + block_regex: /\.automobilwoche\.de\/s3fs-public\/js\/js_nCw.+\.js/ }, "AutoPlus.fr": { domain: "autoplus.fr", @@ -279,10 +279,6 @@ var defaultSites = { allow_cookies: 1, block_regex: /\.qiota\.com\// }, - "Cellesche Zeitung": { - domain: "cz.de", - allow_cookies: 1, - }, "Challenges": { domain: "challenges.fr", allow_cookies: 1, diff --git a/sites_updated.json b/sites_updated.json index 1d20f23..99b5c29 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -1,4 +1,9 @@ { + "Automobilwoche": { + "domain": "automobilwoche.de", + "allow_cookies": 1, + "block_regex": "\\.automobilwoche\\.de\\/s3fs-public\\/js\\/js_nCw.+\\.js" + }, "Bloomberg Adria": { "domain": "bloombergadria.com", "allow_cookies": 1,