Add PhiloMag.de

merge-requests/10/head
magnolia1234 1 year ago
parent 5d723ab0de
commit 67b9957ca6

@ -529,7 +529,8 @@ Grouped in options:\
[Mitteldeutsche Zeitung](https://www.mz.de) -
[Neue Westfälische](https://www.nw.de) -
[Nordwest Zeitung](https://www.nwzonline.de) -
[Piqd.de](https://www.piqd.de) -
[Philosophie Magazin](https://www.philomag.de) -
[Piqd](https://www.piqd.de) -
[Rhein-Zeitung](https://www.rhein-zeitung.de) -
[Süddeutsche Zeitung (link to archive.is)](https://www.sueddeutsche.de) -
[Volksstimme](https://www.volksstimme.de) -

@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Add McClatchy DC
Add Mundo Deportivo
Add PhiloMag.de
Add ZeroHedge
Fix Substack (split content)
Fix Telegraaf.nl
@ -81,7 +82,7 @@ Fix custom sites (block_regex)
Add Ad.nl (+ regional) & Hln.be (link to archive.is)
Add Field & Stream
Add Nieuwsblad.be & Standaard.be (link to archive.is)
Add Philomag.com
Add PhiloMag.com
Add Public.fr
Add Record.pt
Add The New York Post

@ -61,7 +61,8 @@ if (bg2csData.ld_json && dompurify_loaded) {
if (json_script) {
try {
let json = JSON.parse(json_script.text);
let json_text = parseHtmlEntities(json.articleBody ? json.articleBody : json.text);
let json_key = Object.keys(json).find(key => key.match(/^(articlebody|text)$/i));
let json_text = parseHtmlEntities((json[json_key].replace(/(\r)?\n/g, '<br><br>')));
let content = document.querySelector(article_sel);
if (json_text && content) {
let parser = new DOMParser();
@ -694,6 +695,27 @@ else if (matchDomain('nzz.ch')) {
}
}
else if (matchDomain('philomag.de')) {
let paywall = document.querySelector('div[id^="block-paywall"]');
if (paywall) {
removeDOMElement(paywall);
let json_script = getArticleJsonScript();
if (json_script) {
let json = JSON.parse(json_script.text);
if (json) {
let json_text = json.articlebody.replace('%paywall%', '').replace(/(\\r)?\\n/g, '<br><br>');
let content = document.querySelector('div.content-center > div.description');
if (json_text && content) {
content.innerHTML = '';
let article_new = document.createElement('p');
article_new.innerText = json_text;
content.appendChild(article_new);
}
}
}
}
}
else if (matchDomain('rheinpfalz.de')) {
let url = window.location.href;
if (url.includes('reduced=true')) {
@ -4662,7 +4684,7 @@ function getArticleJsonScript() {
let scripts = document.querySelectorAll('script[type="application/ld+json"]');
let json_script;
for (let script of scripts) {
if (script.innerText.match(/"(articleBody|text)":/)) {
if (script.innerText.match(/"(articlebody|text)":/i)) {
json_script = script;
break;
}

@ -486,6 +486,7 @@
"*://*.petitbleu.fr/*",
"*://*.philanthropy.com/*",
"*://*.philomag.com/*",
"*://*.philomag.de/*",
"*://*.philosophynow.org/*",
"*://*.pilotonline.com/*",
"*://*.piqd.de/*",

@ -1490,11 +1490,15 @@ var defaultSites = {
],
block_regex: /(cdn\.cxense\.com\/|\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/
},
"Philosophie Magazine": {
"PhiloMag.com": {
domain: "philomag.com",
allow_cookies: 1,
block_regex: /\.poool\.fr\//
},
"PhiloMag.de": {
domain: "philomag.de",
allow_cookies: 1
},
"Philosophy Now": {
domain: "philosophynow.org"
},

Loading…
Cancel
Save