Fix Media Group Westfalen

merge-requests/16/head
magnolia1234 8 months ago
parent c1fe970b42
commit 25001ed17b

@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
Post-release
Add Interesting Engineering
Fix Media Group Westfalen
Fix Mediahuis Nederland Regional (js)
Fix The Atlantic (images)

@ -1258,9 +1258,19 @@ else if (matchDomain('ruhrnachrichten.de') || document.querySelector('a.mgw-logo
let paywall = document.querySelector('body.is_plus_article');
if (paywall && dompurify_loaded) {
paywall.classList.remove('is_plus_article');
let json_url;
let json_url_dom = document.querySelector('head > link[rel="alternate"][type="application/json"][href]');
if (json_url_dom) {
let json_url = json_url_dom.href;
} else {
let pathname = window.location.pathname;
let article_id;
if (pathname.includes('-p-'))
article_id = pathname.split('-p-')[1].split('/')[0];
if (article_id)
json_url = 'https://' + window.location.hostname + '/wp-json/wp/v2/posts/' + article_id;
}
if (json_url) {
fetch(json_url)
.then(response => {
if (response.ok) {

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

Loading…
Cancel
Save