From fdf81a942988e2266a5f1962f9afb387713184a5 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 28 Mar 2023 18:24:10 +0200 Subject: [PATCH] Add TagesAnzeiger.ch (link to archive.is) --- README.md | 1 + changelog.txt | 1 + contentScript.js | 11 +++++++++++ custom/manifest.json | 2 +- manifest.json | 3 ++- sites.js | 5 +++++ sites_updated.json | 8 ++++++++ 7 files changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1866e3cd..387cec0a 100644 --- a/README.md +++ b/README.md @@ -750,6 +750,7 @@ Grouped in options:\ [Beobachter](https://www.beobachter.ch) - [Handelszeitung](https://www.handelszeitung.ch) - [Neue Zürcher Zeitung (+ regional/CH Media; opt-in to custom sites)](https://www.nzz.ch) - +[Tages-Anzeiger (link to archive.is)](https://www.tagesanzeiger.ch) - [The Market](https://themarket.ch) ##### Australia/New Zealand diff --git a/changelog.txt b/changelog.txt index 69987fe7..4fd0644f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases Post-release +Add TagesAnzeiger.ch (link to archive.is) Fix BusinessPost.ie (json) Fix The Spectator World (new domain) Fix TownNews sites (js) diff --git a/contentScript.js b/contentScript.js index 93bd95c6..da721d0b 100644 --- a/contentScript.js +++ b/contentScript.js @@ -825,6 +825,17 @@ else if (matchDomain('sueddeutsche.de')) { } } +else if (matchDomain('tagesanzeiger.ch')) { + let url = window.location.href; + let paywall = document.querySelector('div#piano-premium > div'); + if (paywall) { + removeDOMElement(paywall.parentNode); + let article = document.querySelector('article p'); + if (article) + article.firstChild.before(archiveLink(url)); + } +} + else if (matchDomain('tagesspiegel.de')) { let url = window.location.href; let paywall = document.querySelector('div.article--paid > div'); diff --git a/custom/manifest.json b/custom/manifest.json index 1d905e38..e5d4931b 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.1.1.2" + "version": "3.1.1.3" } diff --git a/manifest.json b/manifest.json index 22b137b1..071bf63f 100644 --- a/manifest.json +++ b/manifest.json @@ -583,6 +583,7 @@ "*://*.suomensotilas.fi/*", "*://*.svz.de/*", "*://*.syracuse.com/*", + "*://*.tagesanzeiger.ch/*", "*://*.tagesspiegel.de/*", "*://*.tampabay.com/*", "*://*.techinasia.com/*", @@ -744,5 +745,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.1.1.2" + "version": "3.1.1.3" } diff --git a/sites.js b/sites.js index 2b1cf29f..ccdaba7b 100644 --- a/sites.js +++ b/sites.js @@ -1772,6 +1772,11 @@ var defaultSites = { allow_cookies: 1, block_regex: /\/suomensotilas\.fi\/wp-content\/plugins\/epflpw\/js\/pw\.js/ }, + "TagesAnzeiger.ch (link to archive.is)": { + domain: "tagesanzeiger.ch", + allow_cookies: 1, + block_regex: /\.piano\.io\/xbuilder\/experience\/execute/ + }, "Tampa Bay Times": { domain: "tampabay.com", allow_cookies: 1, diff --git a/sites_updated.json b/sites_updated.json index 27c17897..f9d478a8 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -50,6 +50,14 @@ "block_regex": "(\\.poool\\.fr\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)", "cs_code": "[{\"cond\":\".amorce\",\"rm_elem\":1},{\"cond\":\".user-paying-content\",\"rm_attrib\":\"class|hidden\"}]" }, + "TagesAnzeiger.ch (link to archive.is)": { + "domain": "tagesanzeiger.ch", + "allow_cookies": 1, + "block_regex": "\\.piano\\.io\\/xbuilder\\/experience\\/execute", + "add_ext_link": "div#piano-premium > div|article p", + "add_ext_link_type": "archive.is", + "new_site": 1 + }, "The Art Newspaper": { "domain": "theartnewspaper.com", "allow_cookies": 1,