mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 04:01:58 +01:00
Fix Mediahuis Nederland Regional (js)
This commit is contained in:
parent
970382face
commit
18abb16d68
8 changed files with 27 additions and 127 deletions
|
@ -481,7 +481,7 @@ ext_api.storage.local.get({
|
|||
} else {
|
||||
ext_api.management.getSelf(function (result) {
|
||||
if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) {
|
||||
let new_groups = ['###_de_mhs', '###_uk_delinian'];
|
||||
let new_groups = ['###_au_nine_ent', '###_uk_delinian'];
|
||||
let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain))) ||
|
||||
(!enabledSites.includes('###_usa_craincomm') && enabledSites.includes('###_usa_genomeweb'));
|
||||
if (open_options)
|
||||
|
|
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
|
|||
Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
|
||||
|
||||
Post-release
|
||||
Fix Mediahuis Nederland Regional (js)
|
||||
|
||||
* v3.3.6.0 (2023-10-01)
|
||||
Add Conde Nast Traveler
|
||||
|
@ -1270,7 +1271,7 @@ Add Ad Age & Automotive News (group Crain Communications)
|
|||
Add MediaNews Group (local USA)
|
||||
Add The Intercept
|
||||
Remove Slader (obsolete)
|
||||
Fix group Mediahuis Nederland Regional
|
||||
Fix Mediahuis Nederland Regional
|
||||
Fix Medium (timing)
|
||||
Fix The Australian
|
||||
Fix The Daily Beast (proper/images)
|
||||
|
@ -1346,7 +1347,7 @@ Fix blocked referer
|
|||
Update custom sites (set useragent Bingbot)
|
||||
|
||||
* v2.2.6.0 (2021-06-20)
|
||||
Add group Mediahuis Nederland Regional
|
||||
Add Mediahuis Nederland Regional
|
||||
Remove The Northern Star (obsolete)
|
||||
Fix Atlantico.fr
|
||||
Fix Boston Globe (no opt-in)
|
||||
|
|
|
@ -30,7 +30,6 @@ var it_ilmessaggero_domains = ['corriereadriatico.it', 'ilgazzettino.it', 'ilmat
|
|||
var it_gedi_domains = ['italian.tech', 'lastampa.it', 'lescienze.it', 'repubblica.it'];
|
||||
var it_quotidiano_domains = ['ilgiorno.it', 'ilrestodelcarlino.it', 'iltelegrafolivorno.it', 'lanazione.it', 'quotidiano.net'];
|
||||
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_adr_domains = ['ad.nl', 'bd.nl', 'bndestem.nl', 'destentor.nl', 'ed.nl', 'gelderlander.nl', 'pzc.nl', 'tubantia.nl'];
|
||||
var nl_dpg_media_domains = ['demorgen.be', 'flair.nl', 'humo.be', 'libelle.nl', 'margriet.nl', 'parool.nl', 'trouw.nl', 'volkskrant.nl'];
|
||||
var no_nhst_media_domains = ['europower.no', 'fiskeribladet.no', 'intrafish.com', 'intrafish.no', 'rechargenews.com', 'tradewindsnews.com', 'upstreamonline.com'];
|
||||
|
@ -2431,92 +2430,6 @@ else if (matchDomain(['lc.nl', 'dvhn.nl']) || document.querySelector('head > lin
|
|||
hideDOMElement(...ads);
|
||||
}
|
||||
|
||||
else if (matchDomain(nl_mediahuis_region_domains)) {
|
||||
window.setTimeout(function () {
|
||||
let close_button = document.querySelector('button[data-testid="button-close"]');
|
||||
if (close_button)
|
||||
close_button.click();
|
||||
let premium = document.querySelector('div.common-components-plus_pluslabel--container');
|
||||
if (premium && dompurify_loaded) {
|
||||
let hidden_article = document.querySelector('div[data-auth-body="article"]');
|
||||
if (hidden_article)
|
||||
hidden_article.removeAttribute('style');
|
||||
let paywall = document.querySelector('div[data-auth-root="paywall"]');
|
||||
removeDOMElement(paywall);
|
||||
let auth_body = document.querySelector('div[data-auth-body="article"]');
|
||||
if (paywall && auth_body) {
|
||||
let auth_body_par_count = auth_body.querySelectorAll('p');
|
||||
if (auth_body_par_count.length < 2) {
|
||||
let json_script = document.querySelector('script[data-fragment-type="PacoArticleContent"]');
|
||||
let json_str = json_script.text.substring(json_script.textContent.indexOf('{'));
|
||||
try {
|
||||
let json = JSON.parse(json_str);
|
||||
let article = Object.values(json)[0]['data']['article']['body'];
|
||||
auth_body.innerHTML = '';
|
||||
let par_html, par_dom, par_elem, par_div, par_key;
|
||||
let parser = new DOMParser();
|
||||
for (let par of article) {
|
||||
for (let key in par) {
|
||||
par_dom = document.createElement('p');
|
||||
par_elem = '';
|
||||
par_key = par[key];
|
||||
if (key === 'subhead') {
|
||||
par_html = parser.parseFromString('<div><strong>' + DOMPurify.sanitize(par_key) + '</strong></div>', 'text/html');
|
||||
par_elem = par_html.querySelector('div');
|
||||
} else if (key === 'twitter' || key === 'instagram') {
|
||||
par_elem = document.createElement('a');
|
||||
Object.assign(par_elem, {
|
||||
href: par_key,
|
||||
innerText: par_key.split('?')[0],
|
||||
target: '_blank'
|
||||
});
|
||||
} else if (key === 'youtube') {
|
||||
par_elem = document.createElement('iframe');
|
||||
Object.assign(par_elem, {
|
||||
src: 'https://www.youtube.com/embed/' + par_key.id,
|
||||
id: 'ytplayer',
|
||||
type: 'text/html',
|
||||
width: 640,
|
||||
height: 360,
|
||||
frameborder: 0
|
||||
});
|
||||
} else if (key === 'streamone') {
|
||||
par_elem = document.createElement('iframe');
|
||||
Object.assign(par_elem, {
|
||||
src: 'https://content.tmgvideo.nl/embed/item=' + par_key.id,
|
||||
type: 'text/html',
|
||||
width: 640,
|
||||
height: 360,
|
||||
frameborder: 0
|
||||
});
|
||||
} else if (key === 'image') {
|
||||
par_elem = document.createElement('div');
|
||||
let par_img = document.createElement('img');
|
||||
par_img.src = par_key.url;
|
||||
par_elem.appendChild(par_img);
|
||||
par_div = document.createElement('div');
|
||||
par_div.innerText = par[key].caption ? par[key].caption : '';
|
||||
par_div.innerText += par[key].credit ? '\n' + par[key].credit : '';
|
||||
par_elem.appendChild(par_div);
|
||||
} else {
|
||||
par_html = parser.parseFromString('<p style="font-size: 18px; line-height: 1.625;">' + DOMPurify.sanitize(par_key) + '</div>', 'text/html');
|
||||
par_elem = par_html.querySelector('p');
|
||||
}
|
||||
if (par_elem)
|
||||
par_dom.appendChild(par_elem);
|
||||
auth_body.appendChild(par_dom);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn('unable to parse text');
|
||||
console.warn(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
else if (matchDomain(nl_dpg_adr_domains.concat(['hln.be']))) {
|
||||
let url = window.location.href;
|
||||
let paywall = document.querySelector('div#remaining-paid-content');
|
||||
|
|
|
@ -51,5 +51,5 @@
|
|||
"webRequestBlocking",
|
||||
"*://*/*"
|
||||
],
|
||||
"version": "3.3.6.0"
|
||||
"version": "3.3.6.1"
|
||||
}
|
||||
|
|
|
@ -407,6 +407,11 @@
|
|||
"block_regex": "\\.tinypass\\.com",
|
||||
"domain": "nationalobserver.com"
|
||||
},
|
||||
"Naturalgasworld.com": {
|
||||
"allow_cookies": 1,
|
||||
"domain": "naturalgasworld.com",
|
||||
"useragent": "googlebot"
|
||||
},
|
||||
"Newbostonpost.com": {
|
||||
"allow_cookies": 1,
|
||||
"block_regex": "\\/newbostonpost\\.com\\/.+\\/paywall\\/js\\/main\\.js",
|
||||
|
|
|
@ -793,8 +793,9 @@
|
|||
"*://*.ndcmediagroep.nl/*",
|
||||
"*://*.nyt.com/*",
|
||||
"*://*.pasedigital.cl/*",
|
||||
"*://*.tnet.nl/*",
|
||||
"*://*.wyleex.com/*",
|
||||
"*://webcache.googleusercontent.com/*"
|
||||
],
|
||||
"version": "3.3.6.0"
|
||||
"version": "3.3.6.1"
|
||||
}
|
||||
|
|
9
sites.js
9
sites.js
|
@ -188,7 +188,7 @@ var defaultSites = {
|
|||
"watoday.com.au"
|
||||
],
|
||||
allow_cookies: 1,
|
||||
block_regex: "(api\\.{domain}\\/graphql\\?query=.+PaywallRuleQuery|\\.tinypass\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)"
|
||||
block_regex: "\.piano\.io\/xbuilder\/experience\/execute|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)"
|
||||
},
|
||||
"Auto Motor und Sport": {
|
||||
domain: "auto-motor-und-sport.de",
|
||||
|
@ -1442,7 +1442,7 @@ var defaultSites = {
|
|||
"noordhollandsdagblad.nl"
|
||||
],
|
||||
allow_cookies: 1,
|
||||
cs_dompurify: 1
|
||||
block_regex: /\.tnet\.nl\/static\/assets\/js\/login_v\d\.js/
|
||||
},
|
||||
"Mediahuis Noord (+ regional; opt-in to custom sites)": {
|
||||
domain: "###_nl_mediahuis_noord",
|
||||
|
@ -2067,11 +2067,6 @@ var defaultSites = {
|
|||
block_regex: /cdn\.theatlantic\.com\/_next\/static\/chunks\/pages\/.+\/archive\//,
|
||||
remove_cookies_select_drop: ["articleViews"]
|
||||
},
|
||||
"The Australian Financial Review": {
|
||||
domain: "afr.com",
|
||||
allow_cookies: 1,
|
||||
block_regex: /api\.afr\.com\/graphql\?query=.+PaywallRuleQuery/
|
||||
},
|
||||
"The Banker": {
|
||||
domain: "thebanker.com",
|
||||
allow_cookies: 1,
|
||||
|
|
|
@ -17,14 +17,6 @@
|
|||
"block_regex_general": "(\\.blueconic\\.net\\/|[a-z]{1}[0-9]{2,3}\\.[\\w-]+\\.com\\/script\\.js)",
|
||||
"upd_version": "3.3.4.3"
|
||||
},
|
||||
"Cambio Colombia": {
|
||||
"domain": "cambiocolombia.com",
|
||||
"allow_cookies": 1,
|
||||
"amp_redirect": "div#require-access",
|
||||
"amp_unhide": 1,
|
||||
"block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js",
|
||||
"upd_version": "3.3.3.2"
|
||||
},
|
||||
"Condé Nast Traveler": {
|
||||
"domain": "cntraveler.com",
|
||||
"allow_cookies": 1,
|
||||
|
@ -33,6 +25,19 @@
|
|||
"useragent": "googlebot",
|
||||
"upd_version": "3.3.5.1"
|
||||
},
|
||||
"Mediahuis Nederland Regional": {
|
||||
"domain": "###_nl_mediahuis_region",
|
||||
"group": [
|
||||
"gooieneemlander.nl",
|
||||
"haarlemsdagblad.nl",
|
||||
"ijmuidercourant.nl",
|
||||
"leidschdagblad.nl",
|
||||
"noordhollandsdagblad.nl"
|
||||
],
|
||||
"allow_cookies": 1,
|
||||
"block_regex": "\\.tnet\\.nl\\/static\\/assets\\/js\\/login_v\\d\\.js",
|
||||
"upd_version": "3.3.6.1"
|
||||
},
|
||||
"Mexico News Daily": {
|
||||
"domain": "mexiconewsdaily.com",
|
||||
"allow_cookies": 1,
|
||||
|
@ -46,13 +51,6 @@
|
|||
"ld_google_webcache": "div.article-sections__paywall|div.article-body-text",
|
||||
"upd_version": "3.3.5.5"
|
||||
},
|
||||
"South China Morning Post": {
|
||||
"domain": "scmp.com",
|
||||
"block_regex": "(\\.tinypass\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|subscriptions)-.+\\.js)",
|
||||
"amp_unhide": 1,
|
||||
"cs_code": "[{\"cond\":\"section[data-qa='ContentBody-ContentBodyContainer'][class]\", \"rm_attrib\":\"class\"}]",
|
||||
"upd_version": "3.3.3.1"
|
||||
},
|
||||
"The Columbian": {
|
||||
"domain": "columbian.com",
|
||||
"remove_cookies_select_drop": ["blaize_session"],
|
||||
|
@ -73,12 +71,6 @@
|
|||
"useragent": "googlebot",
|
||||
"upd_version": "3.1.4.0"
|
||||
},
|
||||
"The News Minute": {
|
||||
"domain": "thenewsminute.com",
|
||||
"allow_cookies": 1,
|
||||
"ld_json": "div#paywall-banner|div.arr--story-page-card-wrapper",
|
||||
"upd_version": "3.3.3.6"
|
||||
},
|
||||
"The Week (regwall)": {
|
||||
"domain": "###_uk_theweek",
|
||||
"group": [
|
||||
|
@ -87,12 +79,5 @@
|
|||
"allow_cookies": 1,
|
||||
"cs_code": "[{\"cond\":\"div.kiosq-main-layer\", \"rm_elem\":1}, {\"cond\":\"div.paywall-locker\", \"rm_class\":\"paywall-locker\"}]",
|
||||
"upd_version": "3.3.4.1"
|
||||
},
|
||||
"Vikatan": {
|
||||
"domain": "vikatan.com",
|
||||
"allow_cookies": 1,
|
||||
"ld_json": "div#paywallDisplay|div.story-element>div",
|
||||
"cs_code": "[{\"cond\":\"div[class^='styles-m__story-card-wrapper_']\", \"rm_attrib\":\"class\"}]",
|
||||
"upd_version": "3.3.3.7"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue