mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-13 01:34:16 +01:00
Fix FreiePresse.de
This commit is contained in:
parent
cf10f47649
commit
199d0a112f
8 changed files with 35 additions and 15 deletions
|
@ -5,6 +5,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
|
||||||
Post-release
|
Post-release
|
||||||
Add Doorbraak.be
|
Add Doorbraak.be
|
||||||
Add Moda.it (GEDI.it)
|
Add Moda.it (GEDI.it)
|
||||||
|
Fix FreiePresse.de
|
||||||
|
|
||||||
* v3.4.2.0 (2023-11-12)
|
* v3.4.2.0 (2023-11-12)
|
||||||
Add Haymarket Media Group (opt-in to custom sites)
|
Add Haymarket Media Group (opt-in to custom sites)
|
||||||
|
|
|
@ -826,16 +826,27 @@ else if (matchDomain('faz.net')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (matchDomain('freiepresse.de')) {
|
else if (matchDomain('freiepresse.de')) {
|
||||||
let url = window.location.href;
|
if (window.location.pathname.includes('-artikel')) {
|
||||||
let article_teaser = document.querySelector('div.article-teaser');
|
let url = window.location.href;
|
||||||
if (article_teaser && url.match(/(\-artikel)(\d){6,}/)) {
|
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.setTimeout(function () {
|
||||||
window.location.href = url.replace('-artikel', '-amp');
|
let lazy_images = document.querySelectorAll('picture.lazy');
|
||||||
}, 500);
|
for (let elem of lazy_images) {
|
||||||
} else if (url.match(/(\-amp)(\d){6,}/)) {
|
elem.removeAttribute('class');
|
||||||
let amp_ads = document.querySelectorAll('amp-fx-flying-carpet, amp-ad, amp-embed');
|
let source = elem.querySelector('source[data-srcset]');
|
||||||
let pw_layer = document.querySelector('.pw-layer');
|
if (source) {
|
||||||
hideDOMElement(...amp_ads, pw_layer);
|
let img_new = document.createElement('img');
|
||||||
|
img_new.src = source.getAttribute('data-srcset').split(' ')[0];
|
||||||
|
source.parentNode.replaceChild(img_new, source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,5 +51,5 @@
|
||||||
"webRequestBlocking",
|
"webRequestBlocking",
|
||||||
"*://*/*"
|
"*://*/*"
|
||||||
],
|
],
|
||||||
"version": "3.4.2.2"
|
"version": "3.4.2.3"
|
||||||
}
|
}
|
||||||
|
|
|
@ -499,7 +499,7 @@
|
||||||
},
|
},
|
||||||
"Nu.nl": {
|
"Nu.nl": {
|
||||||
"allow_cookies": 1,
|
"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"
|
"domain": "nu.nl"
|
||||||
},
|
},
|
||||||
"Nv.ua": {
|
"Nv.ua": {
|
||||||
|
|
|
@ -807,5 +807,5 @@
|
||||||
"*://*.wyleex.com/*",
|
"*://*.wyleex.com/*",
|
||||||
"*://webcache.googleusercontent.com/*"
|
"*://webcache.googleusercontent.com/*"
|
||||||
],
|
],
|
||||||
"version": "3.4.2.2"
|
"version": "3.4.2.3"
|
||||||
}
|
}
|
||||||
|
|
3
sites.js
3
sites.js
|
@ -704,7 +704,8 @@ var defaultSites = {
|
||||||
"Freie Presse": {
|
"Freie Presse": {
|
||||||
domain: "freiepresse.de",
|
domain: "freiepresse.de",
|
||||||
allow_cookies: 1,
|
allow_cookies: 1,
|
||||||
block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/
|
block_js_inline: /\.freiepresse\.de\/.+-artikel/,
|
||||||
|
cs_dompurify: 1
|
||||||
},
|
},
|
||||||
"Funke Mediengruppe": {
|
"Funke Mediengruppe": {
|
||||||
domain: "###_de_funke_medien",
|
domain: "###_de_funke_medien",
|
||||||
|
|
|
@ -34,6 +34,13 @@
|
||||||
"ld_json_url": "div.register-login-box|div.m-article>div.paywall",
|
"ld_json_url": "div.register-login-box|div.m-article>div.paywall",
|
||||||
"upd_version": "3.4.0.8"
|
"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": {
|
"GaúchaZH": {
|
||||||
"domain": "gauchazh.clicrbs.com.br",
|
"domain": "gauchazh.clicrbs.com.br",
|
||||||
"allow_cookies": 1,
|
"allow_cookies": 1,
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
"addons": {
|
"addons": {
|
||||||
"magnolia@12.34": {
|
"magnolia@12.34": {
|
||||||
"updates": [
|
"updates": [
|
||||||
{ "version": "3.4.1.0",
|
{ "version": "3.4.2.0",
|
||||||
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.4.1.0.xpi" }
|
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.4.2.0.xpi" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue