Add Cellesche Zeitung

This commit is contained in:
magnolia1234 2023-01-16 07:49:29 +00:00
commit e092e72260
7 changed files with 51 additions and 7 deletions

View file

@ -512,6 +512,7 @@ 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) -

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Cellesche Zeitung
* v3.0.1.0 (2023-01-15)
Fix Inc42

View file

@ -526,6 +526,12 @@ else if (matchDomain('cicero.de')) {
removeDOMElement(...urban_ad_sign);
}
else if (matchDomain('cz.de')) {
// plus code in contentScript_once.js (timing)
let banner = document.querySelector('.newsletter-signup-wrapper');
removeDOMElement(banner);
}
else if (matchDomain('faz.net')) {
if (matchDomain('zeitung.faz.net')) {
let paywall_z = document.querySelector('.c-red-carpet');

View file

@ -26,6 +26,16 @@ if (matchDomain('gitlab.com')) {
}, 1000);
}
else 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('nzherald.co.nz')) {
function nzherald_main() {
if (window.Fusion)
@ -145,6 +155,32 @@ function getCookieDomain(hostname) {
return domain;
}
function removeDOMElement(...elements) {
for (let element of elements) {
if (element)
element.remove();
}
}
function waitDOMElement(selector, tagName = '', callback, multiple = false) {
new window.MutationObserver(function (mutations) {
for (let mutation of mutations) {
for (let node of mutation.addedNodes) {
if (!tagName || (node.tagName === tagName)) {
if (node.matches(selector)) {
callback(node);
if (!multiple)
this.disconnect();
}
}
}
}
}).observe(document, {
subtree: true,
childList: true
});
}
function insert_script(func, insertAfterDom) {
let bpc_script = document.querySelector('script#bpc_script');
if (!bpc_script) {

View file

@ -63,12 +63,6 @@
"block_regex": "paywall\\.correiodopovo\\.com\\.br",
"domain": "correiodopovo.com.br"
},
"Cz.de": {
"allow_cookies": 1,
"block_regex": "\\.cz\\.de\\/sites\\/default\\/files\\/js\\/js_.*\\.js",
"cs_code": "[{\"cond\":\"#erasmo\", \"rm_elem\":1, \"elems\":[{\"cond\":\"article\",\"rm_class\":\"news-read-not-allowed\"},{\"cond\":\".newsletter-signup-wrapper\",\"rm_elem\":1}]}]",
"domain": "cz.de"
},
"Dailyherald.com": {
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com",

View file

@ -39,6 +39,7 @@
],
"content_scripts": [{
"matches": [
"*://*.cz.de/*",
"*://*.gitlab.com/magnolia1234",
"*://*.nzherald.co.nz/*"
],
@ -165,6 +166,7 @@
"*://*.curbed.com/*",
"*://*.cw.com.tw/*",
"*://*.cyclingtips.com/*",
"*://*.cz.de/*",
"*://*.dailyadvertiser.com.au/*",
"*://*.dailyliberal.com.au/*",
"*://*.dailypress.com/*",
@ -719,5 +721,5 @@
"*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.0.1.0"
"version": "3.0.1.1"
}

View file

@ -263,6 +263,10 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /\.qiota\.com\//
},
"Cellesche Zeitung": {
domain: "cz.de",
allow_cookies: 1,
},
"Challenges": {
domain: "challenges.fr",
allow_cookies: 1,