Add 4 more NHST Media Group sites

This commit is contained in:
magnolia1234 2022-10-24 19:07:37 +02:00
parent b9b27d3ddd
commit f90543d129
7 changed files with 32 additions and 44 deletions

View file

@ -125,12 +125,6 @@ Grouped in options:\
[Crain's New York Business](https://www.crainsnewyork.com) -
[Modern Healthcare](https://www.modernhealthcare.com)
*NHST Media Group* sites like\
[Intrafish](https://www.intrafish.com) -
[Recharge](https://www.rechargenews.com) -
[TradeWinds](https://www.tradewindsnews.com) -
[Upstream](https://www.upstreamonline.com)
*[PEI Media](https://www.thisispei.com)* sites (opt-in to custom sites)
##### Tech/Science
@ -623,6 +617,18 @@ Grouped in options:\
[Dagblad van het Noorden](https://www.dvhn.nl) -
[Leeuwarder Courant](https://www.lc.nl)
#### Norway
Grouped in options:\
*NHST Media Group* sites like\
[DN](https://www.dn.no) -
[Europower](https://www.europower-energi.no) -
[Fiskeribladet](https://www.fiskeribladet.no) -
[Intrafish](https://www.intrafish.com) -
[Intrafish.no](https://www.intrafish.no) -
[Recharge](https://www.rechargenews.com) -
[TradeWinds](https://www.tradewindsnews.com) -
[Upstream](https://www.upstreamonline.com)
##### Portugal
[Correio da Manhã](https://www.cmjornal.pt) -
[Observador](https://observador.pt)

View file

@ -6,7 +6,7 @@ var ext_name = manifestData.name;
var ext_version = manifestData.version;
const cs_limit_except = ['elespanol.com', 'faz.net', 'globeandmail.com', 'nationalgeographic.com'].concat(de_westfalen_medien_domains);
const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'bloomberg.com', 'cicero.de', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'spectator.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(nl_mediahuis_region_domains, no_nhst_media_domains);
const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'bloomberg.com', 'cicero.de', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'spectator.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(nl_mediahuis_region_domains);
var currentTabUrl = '';
var csDone = false;
var optin_setcookie = false;

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add 4 more NHST Media Group sites
Add Tes Magazine
* v2.9.0.0 (2022-10-23)

View file

@ -25,7 +25,7 @@ var it_quotidiano_domains = ['ilgiorno.it', 'ilrestodelcarlino.it', 'iltelegrafo
var medium_custom_domains = ['betterprogramming.pub', 'towardsdatascience.com'];
var nl_mediahuis_region_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl'];
var nl_dpg_media_domains = ['demorgen.be', 'humo.be', 'parool.nl', 'trouw.nl', 'volkskrant.nl'];
var no_nhst_media_domains = ['intrafish.com', 'rechargenews.com', 'tradewindsnews.com', 'upstreamonline.com'];
var no_nhst_media_domains = ['dn.no', 'europower-energi.no', 'fiskeribladet.no', 'intrafish.com', 'intrafish.no', 'rechargenews.com', 'tradewindsnews.com', 'upstreamonline.com'];
var pe_grupo_elcomercio_domains = ['diariocorreo.pe', 'elcomercio.pe', 'gestion.pe'];
var timesofindia_domains = ['timesofindia.com', 'timesofindia.indiatimes.com'];
var usa_adv_local_domains = ['al.com', 'cleveland.com', 'lehighvalleylive.com', 'masslive.com', 'mlive.com', 'nj.com', 'oregonlive.com', 'pennlive.com', 'silive.com', 'syracuse.com'];
@ -3845,9 +3845,8 @@ else if (matchDomain(timesofindia_domains)) {
}
}
else if (matchDomain(no_nhst_media_domains)) {
let url = window.location.href;
if (url.includes('.tradewinds.com/markets/')) {
else if (matchDomain('tradewindsnews.com')) {
if (window.location.pathname.startsWith('/markets/')) {
let paywall = document.querySelector('iframe[src]');
removeDOMElement(paywall);
let overflow = document.querySelector('body[style]');
@ -3856,37 +3855,6 @@ else if (matchDomain(no_nhst_media_domains)) {
let blurred = document.querySelector('body > div[style]');
if (blurred)
blurred.removeAttribute('style');
} else {
window.setTimeout(function () {
let paywall = document.querySelector('iframe#paywall-iframe');
if (paywall && dompurify_loaded) {
let intro = document.querySelector('div.global-article-selector');
let article = paywall.parentNode;
removeDOMElement(paywall, intro);
fetch(url)
.then(response => {
if (response.ok) {
response.text().then(html => {
let split1 = html.split('window.__INITIAL_STATE__=')[1];
let state = (split1.split('};')[0] + '}').split('</script>')[0];
if (state) {
let json = JSON.parse(state);
if (json) {
let json_text = json.article.body;
let parser = new DOMParser();
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(json_text, {ADD_ATTR: ['itemprop'], ADD_TAGS: ['link']}) + '</div>', 'text/html');
let article_new = doc.querySelector('div');
if (article_new) {
if (article)
article.appendChild(article_new);
}
}
}
})
}
})
}
}, 500);
}
}

View file

@ -183,6 +183,7 @@
"*://*.diariovasco.com/*",
"*://*.digiday.com/*",
"*://*.discovermagazine.com/*",
"*://*.dn.no/*",
"*://*.dna.fr/*",
"*://*.dvhn.nl/*",
"*://*.eastbaytimes.com/*",
@ -219,6 +220,7 @@
"*://*.estrepublicain.fr/*",
"*://*.euobserver.com/*",
"*://*.eurekareport.com.au/*",
"*://*.europower-energi.no/*",
"*://*.exame.com/*",
"*://*.examiner.com.au/*",
"*://*.expansion.com/*",
@ -230,6 +232,7 @@
"*://*.financialexpress.com/*",
"*://*.financialpost.com/*",
"*://*.firstthings.com/*",
"*://*.fiskeribladet.no/*",
"*://*.fnlondon.com/*",
"*://*.forbes.com/*",
"*://*.foreignaffairs.com/*",
@ -307,6 +310,7 @@
"*://*.intelligentinvestor.com.au/*",
"*://*.internazionale.it/*",
"*://*.intrafish.com/*",
"*://*.intrafish.no/*",
"*://*.investorschronicle.co.uk/*",
"*://*.ipolitics.ca/*",
"*://*.irishtimes.com/*",
@ -722,5 +726,5 @@
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.9.0.1"
"version": "2.9.0.2"
}

View file

@ -1334,13 +1334,17 @@ var defaultSites = {
"NHST Media Group": {
domain: "###_no_nhst_media",
group: [
"dn.no",
"europower-energi.no",
"fiskeribladet.no",
"intrafish.com",
"intrafish.no",
"rechargenews.com",
"tradewindsnews.com",
"upstreamonline.com"
],
allow_cookies: 1,
referer: "facebook"
useragent: "googlebot"
},
"Nikkei Asian Review (do not block Piano.io-script externally)": {
domain: "asia.nikkei.com",

View file

@ -9,6 +9,11 @@
"block_regex": "(\\.tinypass\\.com\\/|assets\\.bwbx\\.io\\/s\\d\\/(fence\\/plug-client|javelin\\/.+\\/transporter)\\/)",
"remove_cookies_select_drop": ["gatehouse_id"]
},
"Dn.no": {
"domain": "dn.no",
"allow_cookies": 1,
"useragent": "googlebot"
},
"Grupo Vocento": {
"domain": "###_es_grupo_vocento",
"group": [