Fix FreiePresse.de

This commit is contained in:
magnolia1234 2023-11-13 18:47:44 +01:00
parent cf10f47649
commit 199d0a112f
8 changed files with 35 additions and 15 deletions

View file

@ -5,6 +5,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
Post-release
Add Doorbraak.be
Add Moda.it (GEDI.it)
Fix FreiePresse.de
* v3.4.2.0 (2023-11-12)
Add Haymarket Media Group (opt-in to custom sites)

View file

@ -826,16 +826,27 @@ else if (matchDomain('faz.net')) {
}
else if (matchDomain('freiepresse.de')) {
let url = window.location.href;
let article_teaser = document.querySelector('div.article-teaser');
if (article_teaser && url.match(/(\-artikel)(\d){6,}/)) {
if (window.location.pathname.includes('-artikel')) {
let url = window.location.href;
let paywall = document.querySelector('div.article-teaser');
if (paywall) {
removeDOMElement(paywall);
csDoneOnce = true;
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0];
replaceDomElementExt(url_cache, true, false, 'article');
}
window.setTimeout(function () {
window.location.href = url.replace('-artikel', '-amp');
}, 500);
} else if (url.match(/(\-amp)(\d){6,}/)) {
let amp_ads = document.querySelectorAll('amp-fx-flying-carpet, amp-ad, amp-embed');
let pw_layer = document.querySelector('.pw-layer');
hideDOMElement(...amp_ads, pw_layer);
let lazy_images = document.querySelectorAll('picture.lazy');
for (let elem of lazy_images) {
elem.removeAttribute('class');
let source = elem.querySelector('source[data-srcset]');
if (source) {
let img_new = document.createElement('img');
img_new.src = source.getAttribute('data-srcset').split(' ')[0];
source.parentNode.replaceChild(img_new, source);
}
}
}, 1000);
}
}

View file

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.4.2.2"
"version": "3.4.2.3"
}

View file

@ -499,7 +499,7 @@
},
"Nu.nl": {
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"div.login-wall\",\"rm_elem\":1,\"elems\":[{\"cond\":\"div.authorized-content\",\"rm_class\":\"authorized-content\"}]}]",
"cs_code": "[{\"cond\":\"article#LOGIN\",\"rm_elem\":1},{\"cond\":\"div.authorized-content\",\"rm_class\":\"authorized-content\"}]",
"domain": "nu.nl"
},
"Nv.ua": {

View file

@ -807,5 +807,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.4.2.2"
"version": "3.4.2.3"
}

View file

@ -704,7 +704,8 @@ var defaultSites = {
"Freie Presse": {
domain: "freiepresse.de",
allow_cookies: 1,
block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/
block_js_inline: /\.freiepresse\.de\/.+-artikel/,
cs_dompurify: 1
},
"Funke Mediengruppe": {
domain: "###_de_funke_medien",

View file

@ -34,6 +34,13 @@
"ld_json_url": "div.register-login-box|div.m-article>div.paywall",
"upd_version": "3.4.0.8"
},
"Freie Presse": {
"domain": "freiepresse.de",
"allow_cookies": 1,
"block_js_inline": "\\.freiepresse\\.de\\/.+-artikel",
"ld_google_webcache": "div.article-teaser|article",
"upd_version": "3.4.2.3"
},
"GaúchaZH": {
"domain": "gauchazh.clicrbs.com.br",
"allow_cookies": 1,

View file

@ -2,8 +2,8 @@
"addons": {
"magnolia@12.34": {
"updates": [
{ "version": "3.4.1.0",
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.4.1.0.xpi" }
{ "version": "3.4.2.0",
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.4.2.0.xpi" }
]
}
}