Add Newslaundry

Fix The Quint (json)
This commit is contained in:
magnolia1234 2024-03-23 11:57:15 +01:00
parent 74bddb41d7
commit 049a188119
7 changed files with 68 additions and 26 deletions

View file

@ -938,6 +938,7 @@ Grouped in options:\
[Live Law](https://www.livelaw.in) - [Live Law](https://www.livelaw.in) -
[LiveMint](https://www.livemint.com) - [LiveMint](https://www.livemint.com) -
[Mid-Day](https://www.mid-day.com) - [Mid-Day](https://www.mid-day.com) -
[Newslaundry](https://www.newslaundry.com) -
[Outlook](https://www.outlookindia.com) - [Outlook](https://www.outlookindia.com) -
[Outlook Business](https://www.outlookbusiness.com) - [Outlook Business](https://www.outlookbusiness.com) -
[Swarajyamag](https://swarajyamag.com) - [Swarajyamag](https://swarajyamag.com) -

View file

@ -5,6 +5,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
Post-release Post-release
Add Blick.ch (Ringier Gruppe) Add Blick.ch (Ringier Gruppe)
Add CNN (regwall) Add CNN (regwall)
Add Newslaundry
Fix Bar and Bench (json) Fix Bar and Bench (json)
Fix Clarin (js) Fix Clarin (js)
Fix Expresso.pt (json) Fix Expresso.pt (json)
@ -12,6 +13,7 @@ Fix Haaretz Group (anti-adblocker)
Fix Newsweek.pl (css) Fix Newsweek.pl (css)
Fix The Athletic (scroll) Fix The Athletic (scroll)
Fix The News Minute (json) Fix The News Minute (json)
Fix The Quint (json)
Fix WSJ (disable bot/referer) Fix WSJ (disable bot/referer)
* v3.6.0.0 (2024-03-17) * v3.6.0.0 (2024-03-17)

View file

@ -4269,6 +4269,8 @@ else if (matchDomain('forbes.com')) {
header_nofix(header); header_nofix(header);
} }
} }
let ads = document.querySelectorAll('fbs-ad');
hideDOMElement(...ads);
} }
else if (matchDomain('foreignaffairs.com')) { else if (matchDomain('foreignaffairs.com')) {
@ -4815,6 +4817,29 @@ else if (matchDomain('newsday.com')) {
} }
} }
else if (matchDomain('newslaundry.com')) {
let paywall = document.querySelector('div > div > img[alt^="paywall"]');
if (paywall && dompurify_loaded) {
let banner = document.querySelector('div.FrsvM');
removeDOMElement(paywall.parentNode.parentNode, banner);
let json_script = getArticleJsonScript();
if (json_script) {
let json = JSON.parse(json_script.text);
if (json) {
let json_text = parseHtmlEntities(json.articleBody);
let article = document.querySelector('div.story-element-text');
if (json_text && article) {
let parser = new DOMParser();
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(json_text) + '</div>', 'text/html');
let article_new = doc.querySelector('div');
article.innerHTML = '';
article.appendChild(article_new);
}
}
}
}
}
else if (matchDomain('newsweek.com')) { else if (matchDomain('newsweek.com')) {
let ads = document.querySelectorAll('div#topad, div[id^="dfp-ad-"]'); let ads = document.querySelectorAll('div#topad, div[id^="dfp-ad-"]');
hideDOMElement(...ads); hideDOMElement(...ads);
@ -5617,29 +5642,26 @@ else if (matchDomain('thepointmag.com')) {
} }
else if (matchDomain('thequint.com')) { else if (matchDomain('thequint.com')) {
let paywall = document.querySelector('div#paywall-widget'); let lock = document.querySelector('div > img[alt^="lock"]');
if (paywall) { if (lock && dompurify_loaded) {
removeDOMElement(paywall); lock.removeAttribute('alt');
let json_script = getArticleJsonScript(); window.setTimeout(function () {
if (json_script) { let paywall = document.querySelector('div#paywall-widget');
let json = JSON.parse(json_script.text); if (paywall) {
if (json) { removeDOMElement(paywall);
let json_text = breakText(parseHtmlEntities(json.articleBody));
let article = document.querySelector('div.story-element'); let article = document.querySelector('div.story-element');
if (json_text && article) { if (article) {
let article_new = document.createElement('p'); let article_new = getArticleQuintype();
article_new.innerText = json_text; if (article_new && article.parentNode)
article.innerHTML = ''; article.parentNode.replaceChild(article_new, article);
article.appendChild(article_new);
} }
} }
} else let body_hidden = document.querySelector('div#story-body-wrapper');
refreshCurrentTab(); if (body_hidden) {
let body_hidden = document.querySelector('div#story-body-wrapper'); body_hidden.removeAttribute('class');
if (body_hidden) { body_hidden.removeAttribute('style');
body_hidden.removeAttribute('class'); }
body_hidden.removeAttribute('style'); }, 4000);
}
function thequint_unhide(node) { function thequint_unhide(node) {
node.removeAttribute('style'); node.removeAttribute('style');
} }
@ -6758,7 +6780,7 @@ function getArticleQuintype() {
let story_elements = par['story-elements']; let story_elements = par['story-elements'];
for (let elem of story_elements) { for (let elem of story_elements) {
let par_elem; let par_elem;
if (elem.type === 'text' && elem.text && dompurify_loaded) { if (['text', 'title'].includes(elem.type) && elem.text) {
let doc = parser.parseFromString('<div style="margin: 25px 0px">' + DOMPurify.sanitize(elem.text, dompurify_options) + '</div>', 'text/html'); let doc = parser.parseFromString('<div style="margin: 25px 0px">' + DOMPurify.sanitize(elem.text, dompurify_options) + '</div>', 'text/html');
par_elem = doc.querySelector('div'); par_elem = doc.querySelector('div');
} else if (elem.type === 'image') { } else if (elem.type === 'image') {
@ -6769,7 +6791,11 @@ function getArticleQuintype() {
par_elem.appendChild(img); par_elem.appendChild(img);
if (elem.title) { if (elem.title) {
let caption = document.createElement('figcaption'); let caption = document.createElement('figcaption');
caption.innerText = elem.title; if (elem.title.includes('</')) {
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(elem.title, dompurify_options) + '</div>', 'text/html');
caption.appendChild(doc.querySelector('div'));
} else
caption.innerText = elem.title;
par_elem.appendChild(caption); par_elem.appendChild(caption);
} }
} }

View file

@ -51,5 +51,5 @@
"webRequestBlocking", "webRequestBlocking",
"*://*/*" "*://*/*"
], ],
"version": "3.6.0.7" "version": "3.6.0.8"
} }

View file

@ -505,6 +505,7 @@
"*://*.news-press.com/*", "*://*.news-press.com/*",
"*://*.newscientist.com/*", "*://*.newscientist.com/*",
"*://*.newsday.com/*", "*://*.newsday.com/*",
"*://*.newslaundry.com/*",
"*://*.newsobserver.com/*", "*://*.newsobserver.com/*",
"*://*.newstatesman.com/*", "*://*.newstatesman.com/*",
"*://*.newsweek.com/*", "*://*.newsweek.com/*",
@ -862,5 +863,5 @@
"*://archive.vn/*", "*://archive.vn/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "3.6.0.7" "version": "3.6.0.8"
} }

View file

@ -1804,6 +1804,11 @@ var defaultSites = {
allow_cookies: 1, allow_cookies: 1,
block_regex: /(loader-cdn\.azureedge\.net\/|js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ block_regex: /(loader-cdn\.azureedge\.net\/|js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/
}, },
"Newslaundry": {
domain: "newslaundry.com",
allow_cookies: 1,
cs_dompurify: 1
},
"Newsquest Media Group (UK; opt-in to custom sites)": { "Newsquest Media Group (UK; opt-in to custom sites)": {
domain: "###_uk_newsquest", domain: "###_uk_newsquest",
group: [], group: [],
@ -2618,7 +2623,8 @@ var defaultSites = {
}, },
"The Quint": { "The Quint": {
domain: "thequint.com", domain: "thequint.com",
allow_cookies: 1 allow_cookies: 1,
cs_dompurify: 1
}, },
"The Salt Lake Tribune": { "The Salt Lake Tribune": {
domain: "sltrib.com", domain: "sltrib.com",
@ -3127,4 +3133,4 @@ var fr_indigo_nofix_domains = ['africaintelligence.com', 'africaintelligence.fr'
var fr_jamg_nofix_domains = ['africabusinessplus.com', 'jeuneafrique.com', 'theafricareport.com']; var fr_jamg_nofix_domains = ['africabusinessplus.com', 'jeuneafrique.com', 'theafricareport.com'];
var it_gedi_nofix_domains = ['gelocal.it', 'limesonline.com']; var it_gedi_nofix_domains = ['gelocal.it', 'limesonline.com'];
var nl_mediahuis_region_nofix_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl']; var nl_mediahuis_region_nofix_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl'];
var nofix_sites = ['11freunde.de', 'aamulehti.fi', 'aftenposten.no', 'aftonbladet.se', 'allgaeuer-zeitung.de', 'americanscientist.org', 'arkansasonline.com', 'asahi.com', 'asiatimes.com', 'aviationweek.com', 'badische-zeitung.de', 'bhaskar.com', 'bloomberglaw.com', 'bloombergtax.com', 'bnef.com', 'bnn.de', 'borsen.dk', 'businessdesk.co.nz', 'businessinsider.de', 'businessinsider.jp', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'chegg.com', 'codesports.com.au', 'compactmag.com', 'coursehero.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'ewmagazine.nl', 'falter.at', 'finance.si', 'franc-tireur.fr', 'ftchinese.com', 'ftchineselive.com', 'gamestar.de', 'geo.de', 'golem.de', 'gp.se', 'gva.be', 'handelsblatt.com', 'hbrarabic.com', 'hbrchina.org', 'hbrfrance.fr', 'heise.de', 'hs.fi', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jungefreiheit.de', 'kleinezeitung.at', 'krone.at', 'laverita.info', 'lavie.fr', 'lavozdegalicia.es', 'law360.co.uk', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefigaro.fr', 'lefilmfrancais.com', 'lemonde.fr', 'lequipe.fr', 'lesjours.fr', 'letemps.ch', 'liberation.fr', 'libertiesjournal.com', 'lr-online.de', 'main-echo.de', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'money.it', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'motorsport.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newcriterion.com', 'news24.com', 'newslaundry.com', 'nn.de', 'nwzonline.de', 'on3.com', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'puck.news', 'quillette.com', 'rbc.ru', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'saechsische.de', 'sciencedirect.com', 'springer.com', 'statnews.com', 'stern.de', 'stimme.de', 'streetinsider.com', 'substack.com', 'svd.se', 'swp.de', 'taxation.co.uk', 'taxjournal.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thestar.com.my', 'thewirechina.com', 'timeslive.co.za', 'usine-digitale.fr', 'weltwoche.ch', 'weltwoche.de', 'wissenschaft.de', 'worldpoliticsreview.com', 'wz.de', 'zaobao.com.sg'].concat(de_funke_medien_nofix_domains, de_rp_aachen_medien_nofix_domains, de_westfalen_medien_nofix_domains, fr_be_groupe_rossel_nofix_domains, fr_groupe_ebra_nofix_domains, fr_indigo_nofix_domains, fr_jamg_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains); var nofix_sites = ['11freunde.de', 'aamulehti.fi', 'aftenposten.no', 'aftonbladet.se', 'allgaeuer-zeitung.de', 'americanscientist.org', 'arkansasonline.com', 'asahi.com', 'asiatimes.com', 'aviationweek.com', 'badische-zeitung.de', 'bhaskar.com', 'bloomberglaw.com', 'bloombergtax.com', 'bnef.com', 'bnn.de', 'borsen.dk', 'businessdesk.co.nz', 'businessinsider.de', 'businessinsider.jp', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'chegg.com', 'codesports.com.au', 'compactmag.com', 'coursehero.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'ewmagazine.nl', 'falter.at', 'finance.si', 'franc-tireur.fr', 'ftchinese.com', 'ftchineselive.com', 'gamestar.de', 'geo.de', 'golem.de', 'gp.se', 'gva.be', 'handelsblatt.com', 'hbrarabic.com', 'hbrchina.org', 'hbrfrance.fr', 'heise.de', 'hs.fi', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jungefreiheit.de', 'kleinezeitung.at', 'krone.at', 'laverita.info', 'lavie.fr', 'lavozdegalicia.es', 'law360.co.uk', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefigaro.fr', 'lefilmfrancais.com', 'lemonde.fr', 'lequipe.fr', 'lesjours.fr', 'letemps.ch', 'liberation.fr', 'libertiesjournal.com', 'lr-online.de', 'main-echo.de', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'money.it', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'motorsport.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newcriterion.com', 'news24.com', 'nn.de', 'nwzonline.de', 'on3.com', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'puck.news', 'quillette.com', 'rbc.ru', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'saechsische.de', 'sciencedirect.com', 'springer.com', 'statnews.com', 'stern.de', 'stimme.de', 'streetinsider.com', 'substack.com', 'svd.se', 'swp.de', 'taxation.co.uk', 'taxjournal.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thestar.com.my', 'thewirechina.com', 'timeslive.co.za', 'usine-digitale.fr', 'weltwoche.ch', 'weltwoche.de', 'wissenschaft.de', 'worldpoliticsreview.com', 'wz.de', 'zaobao.com.sg'].concat(de_funke_medien_nofix_domains, de_rp_aachen_medien_nofix_domains, de_westfalen_medien_nofix_domains, fr_be_groupe_rossel_nofix_domains, fr_groupe_ebra_nofix_domains, fr_indigo_nofix_domains, fr_jamg_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains);

View file

@ -111,6 +111,12 @@
"block_regex": "\\.{domain}\\/thenewsbar\\/config", "block_regex": "\\.{domain}\\/thenewsbar\\/config",
"upd_version": "3.5.8.6" "upd_version": "3.5.8.6"
}, },
"Newslaundry": {
"domain": "newslaundry.com",
"allow_cookies": 1,
"ld_json": "div.FrsvM|div.story-element-text",
"upd_version": "3.6.0.8"
},
"Observador.pt": { "Observador.pt": {
"domain": "observador.pt", "domain": "observador.pt",
"allow_cookies": 1, "allow_cookies": 1,