mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:11:56 +01:00
Fix Media Group Westfalen
This commit is contained in:
parent
c1fe970b42
commit
25001ed17b
3 changed files with 13 additions and 2 deletions
|
@ -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…
Reference in a new issue