mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:51:58 +01:00
Add DvhN.nl
Fix TheTimes.co.uk (overlay)
This commit is contained in:
parent
e092e72260
commit
275c5e7a8a
7 changed files with 94 additions and 24 deletions
|
@ -643,6 +643,7 @@ Grouped in options:\
|
|||
[IJmuider Courant](https://www.ijmuidercourant.nl) -
|
||||
[De Gooi- en Eemlander](https://www.gooieneemlander.nl)\
|
||||
*Mediahuis Noord* sites like (opt-in to custom sites for unlisted)\
|
||||
[Dagblad van het Noorden](https://www.dvhn.nl) -
|
||||
[Leeuwarder Courant](https://www.lc.nl)
|
||||
|
||||
##### Norway
|
||||
|
|
|
@ -12,7 +12,7 @@ if (typeof ext_api.action !== 'object') {
|
|||
ext_api.action = ext_api.browserAction;
|
||||
}
|
||||
|
||||
const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'bloomberg.com', 'cicero.de', 'dn.no', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'inc42.com', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lecourrierdesstrateges.fr', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'sloanreview.mit.edu', 'stratfor.com', 'techinasia.com', 'thebulletin.org', 'timesofindia.com', 'valor.globo.com', 'vn.nl', 'zerohedge.com'].concat(nl_mediahuis_region_domains, no_nhst_media_domains);
|
||||
const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'bloomberg.com', 'cicero.de', 'dn.no', 'dvhn.nl', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'inc42.com', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lecourrierdesstrateges.fr', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'sloanreview.mit.edu', 'stratfor.com', 'techinasia.com', 'thebulletin.org', 'timesofindia.com', 'valor.globo.com', 'vn.nl', 'zerohedge.com'].concat(nl_mediahuis_region_domains, no_nhst_media_domains);
|
||||
var optin_setcookie = false;
|
||||
var optin_update = true;
|
||||
var blocked_referer = false;
|
||||
|
@ -1320,7 +1320,7 @@ ext_api.runtime.onMessage.addListener(function (message, sender) {
|
|||
let custom_domain = message.data.domain;
|
||||
let group = message.data.group;
|
||||
if (group) {
|
||||
let nofix_groups = ['###_substack_custom', '###_ch_tamedia'];
|
||||
let nofix_groups = ['###_substack_custom', '###_ch_tamedia', '###_it_citynews'];
|
||||
if (enabledSites.concat(nofix_groups).includes(group) && custom_domain && !custom_flex_domains.includes(custom_domain)) {
|
||||
let rules;
|
||||
if (group === 'elmercurio.com')
|
||||
|
|
|
@ -3,6 +3,9 @@ Changelog Bypass Paywalls Clean - Firefox
|
|||
|
||||
Post-release
|
||||
Add Cellesche Zeitung
|
||||
Add DvhN.nl
|
||||
Fix Fd.nl (search)
|
||||
Fix TheTimes.co.uk (overlay)
|
||||
|
||||
* v3.0.1.0 (2023-01-15)
|
||||
Fix Inc42
|
||||
|
@ -44,7 +47,7 @@ Add Republic.ru
|
|||
Add The-Village.ru
|
||||
Add Wiwo.de
|
||||
Add Wonderzine (ru)
|
||||
Remove Dvhn.nl & Mediahuis Belgie (fix obsolete)
|
||||
Remove DvhN.nl & Mediahuis Belgie (fix obsolete)
|
||||
Fix New York Magazine sites (timing cookies)
|
||||
Update block general paywall script (Axate.io)
|
||||
Update custom sites (block_js_inline)
|
||||
|
|
|
@ -40,7 +40,7 @@ var usa_outside_mag_domains = ["backpacker.com", "betamtb.com", "betternutrition
|
|||
var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com'];
|
||||
|
||||
// clean local storage of sites (with an exemption for hold-list)
|
||||
var arr_localstorage_hold = ['aachener-nachrichten.de', 'aachener-zeitung.de', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'lanouvellerepublique.fr', 'latimes.com', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nationalreview.com', 'nknews.org', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'nwzonline.de', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thebulletin.org', 'thecritic.co.uk', 'thetimes.co.uk', 'uol.com.br', 'wsj.com'].concat(ca_gcm_domains, de_funke_medien_domains, de_westfalen_medien_domains, es_epiberica_domains, es_epiberica_custom_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_gedi_domains, it_quotidiano_domains, ca_gcm_domains, nl_dpg_media_domains, no_nhst_media_domains, usa_hearst_comm_domains);
|
||||
var arr_localstorage_hold = ['aachener-nachrichten.de', 'aachener-zeitung.de', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'dvhn.nl', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'lanouvellerepublique.fr', 'latimes.com', 'lc.nl', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nationalreview.com', 'nknews.org', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'nwzonline.de', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thebulletin.org', 'thecritic.co.uk', 'thetimes.co.uk', 'uol.com.br', 'wsj.com'].concat(ca_gcm_domains, de_funke_medien_domains, de_westfalen_medien_domains, es_epiberica_domains, es_epiberica_custom_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_gedi_domains, it_quotidiano_domains, ca_gcm_domains, nl_dpg_media_domains, no_nhst_media_domains, usa_hearst_comm_domains);
|
||||
if (!matchDomain(arr_localstorage_hold)) {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
|
@ -1950,13 +1950,9 @@ else
|
|||
} else if (window.location.hostname.match(/\.(be|nl)$/)) {//belgium/netherlands
|
||||
|
||||
if (matchDomain('fd.nl')) {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
if (window.location.href.includes('?'))
|
||||
window.location.href = window.location.href.split('?')[0];
|
||||
let reg_modal = document.querySelector('div.modal.upsell');
|
||||
if (reg_modal)
|
||||
window.location.reload(true);
|
||||
});
|
||||
let reg_modal = document.querySelector('div.modal.upsell');
|
||||
if (reg_modal)
|
||||
refreshCurrentTab();
|
||||
}
|
||||
|
||||
else if (matchDomain('ftm.nl')) {
|
||||
|
@ -1981,7 +1977,65 @@ else if (matchDomain(['knack.be', 'kw.be', 'levif.be'])) {
|
|||
}
|
||||
}
|
||||
|
||||
else if (matchDomain(['lc.nl'])) {
|
||||
else if (matchDomain(['lc.nl', 'dvhn.nl'])) {
|
||||
if (matchDomain('dvhn.nl')) {
|
||||
let paywall = document.querySelector('div.signupPlus');
|
||||
if (paywall && dompurify_loaded) {
|
||||
let intro = document.querySelector('div.startPayWall');
|
||||
removeDOMElement(paywall, intro);
|
||||
let html = document.documentElement.outerHTML;
|
||||
if (html.includes('window.__NUXT__=')) {
|
||||
let json = html.split('window.__NUXT__=')[1].split('</script>')[0].trim();
|
||||
let url_nuxt = json.split(',url:"')[1].split('",')[0].replace(/\\u002F/g, '/');
|
||||
if (url_nuxt && !url_nuxt.includes(window.location.pathname))
|
||||
refreshCurrentTab();
|
||||
let json_text = json.split(',body:')[1].split('leadText:')[0];
|
||||
let article = document.querySelector('div.content');
|
||||
if (article) {
|
||||
article.innerHTML = '';
|
||||
let concat = 0;
|
||||
let elem;
|
||||
let types = json_text.split(/(,|\[){typename:/);
|
||||
for (let type of types) {
|
||||
let type_elem = type.split(',')[0];
|
||||
if (type.includes(',text:')) {
|
||||
if (type.includes(',text:')) {
|
||||
let item = type.split(',text:')[1].split(/(}])?,__typename:/)[0].replace(/(^"|"$)/g, '').replace(/\\u002F/g, '/');
|
||||
if (item.length > 2 && !item.match(/(^\[|\]$)/)) {
|
||||
if (!concat) {
|
||||
elem = document.createElement('p');
|
||||
elem.innerText = item;
|
||||
if (item.match(/\s$/))
|
||||
concat = 2;
|
||||
} else {
|
||||
elem.innerText += (concat < 2 ? ' ' : '') + item;
|
||||
if (item.match(/\s$/))
|
||||
concat = 2;
|
||||
else
|
||||
concat--;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (type.includes('HTMLCustomEmbed')) {
|
||||
if (type.includes(',code:')) {
|
||||
let item = type.split(',code:')[1].split(',type:')[0].replace(/(^"|"$)/g, '').replace(/\\u003C/g, '<').replace(/\\u003E/g, '>').replace(/\\u002F/g, '/').replace(/\\"/g, '"');
|
||||
let parser = new DOMParser();
|
||||
let article_html = parser.parseFromString('<div>' + DOMPurify.sanitize(item, {ADD_TAGS: ['iframe']}) + '</div>', 'text/html');
|
||||
elem = article_html.querySelector('div');
|
||||
}
|
||||
} else if (type_elem.length > 2)
|
||||
console.log(type_elem);
|
||||
if (elem && !concat) {
|
||||
article.appendChild(elem);
|
||||
elem = '';
|
||||
}
|
||||
}
|
||||
if (elem)
|
||||
article.appendChild(elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let top_ad = document.querySelector('.top__ad');
|
||||
removeDOMElement(top_ad);
|
||||
}
|
||||
|
@ -2326,18 +2380,18 @@ else if (matchDomain('theneweuropean.co.uk')) {
|
|||
else if (matchDomain('thetimes.co.uk')) {
|
||||
let url = window.location.href;
|
||||
if (window.location.hostname !== 'epaper.thetimes.co.uk') {
|
||||
let block = document.querySelector('.subscription-block');
|
||||
let adverts = document.querySelectorAll('#ad-article-inline, #sticky-ad-header, div[class*="InlineAdWrapper"], div[class*="NativeAd"], div.gyLkkj');
|
||||
removeDOMElement(block, ...adverts);
|
||||
let paywall = document.querySelector('div#paywall-portal-article-footer');
|
||||
if (paywall && !url.includes('?shareToken=')) {
|
||||
removeDOMElement(paywall);
|
||||
let article = document.querySelector('article[class^="responsive__BodyContainer"]');
|
||||
if (article)
|
||||
article.insertBefore(archiveLink(url), article.firstChild);
|
||||
article.firstChild.before(archiveLink(url));
|
||||
waitDOMAttribute('body', 'BODY', 'style', node => node.removeAttribute('style'), true);
|
||||
}
|
||||
let paywall_page = document.querySelector('div#paywall-portal-page-footer');
|
||||
removeDOMElement(paywall_page);
|
||||
let block = document.querySelector('.subscription-block');
|
||||
let ads = document.querySelectorAll('#ad-article-inline, #sticky-ad-header, div[class*="InlineAdWrapper"], div[class*="NativeAd"], div.gyLkkj');
|
||||
removeDOMElement(paywall_page, block, ...ads);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ window.setTimeout(function () {
|
|||
else if (document.querySelector('script[src*="/leaky-paywall/"], script[src*="/leaky-paywall-"]'))
|
||||
group = '###_wp_leaky_paywall';
|
||||
else if (document.querySelector('script[src*="/substackcdn.com/"], link[rel="stylesheet"][href*="/substackcdn.com/"]'))
|
||||
group = '###_substack_custom';
|
||||
group = '###_substack_custom';// no fix
|
||||
else if (hostname.match(/\.(com|net)\.au$/)) {
|
||||
if (document.querySelector('a[href*="/australiancommunitymedia.zendesk.com/"]'))
|
||||
group = '###_au_comm_media';
|
||||
|
@ -79,13 +79,16 @@ window.setTimeout(function () {
|
|||
else if (document.querySelector('link[href*="/assets.static-chmedia.ch/"]'))
|
||||
group = 'nzz.ch';
|
||||
else if (document.querySelector('link[href*=".tamedia.ch/"]'))
|
||||
group = '###_ch_tamedia';
|
||||
group = '###_ch_tamedia';// no fix
|
||||
} else if (hostname.match(/\.(es|cat)$/) || matchDomain(['diariocordoba.com', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info'])) {
|
||||
if (document.querySelector('link[href*="/estaticos-cdn."]'))
|
||||
group = '###_es_epiberica';
|
||||
} else if (hostname.endsWith('.fr')) {
|
||||
if (document.querySelector('link[href*=".fr/static/bloc/ripolinage/header/cf-header/"]'))
|
||||
group = '###_fr_gcf';
|
||||
} else if (hostname.endsWith('.it')) {
|
||||
if (document.querySelector('link[href^="//citynews.stgy.ovh/"]'))
|
||||
group = '###_it_citynews';// no fix
|
||||
} else if (hostname.endsWith('.nl')) {
|
||||
if (document.querySelector('script[src*=".ndcmediagroep.nl/"]'))
|
||||
group = '###_nl_mediahuis_noord';
|
||||
|
|
|
@ -188,6 +188,7 @@
|
|||
"*://*.discovermagazine.com/*",
|
||||
"*://*.dn.no/*",
|
||||
"*://*.dna.fr/*",
|
||||
"*://*.dvhn.nl/*",
|
||||
"*://*.eastbaytimes.com/*",
|
||||
"*://*.eastwest.eu/*",
|
||||
"*://*.economictimes.com/*",
|
||||
|
@ -716,10 +717,11 @@
|
|||
"*://*.gitlab.com/magnolia1234/*",
|
||||
"*://*.hadrianpaywall.com/*",
|
||||
"*://*.medscapestatic.com/*",
|
||||
"*://*.ndcmediagroep.nl/*",
|
||||
"*://*.nyt.com/*",
|
||||
"*://*.pasedigital.cl/*",
|
||||
"*://*.wallkit.net/*",
|
||||
"*://webcache.googleusercontent.com/*"
|
||||
],
|
||||
"version": "3.0.1.1"
|
||||
"version": "3.0.1.2"
|
||||
}
|
||||
|
|
15
sites.js
15
sites.js
|
@ -1246,10 +1246,17 @@ var defaultSites = {
|
|||
"Mediahuis Noord": {
|
||||
domain: "###_nl_mediahuis_noord",
|
||||
group: [
|
||||
"dvhn.nl",
|
||||
"lc.nl"
|
||||
],
|
||||
allow_cookies: 1,
|
||||
block_regex: /\.evolok\.net\//
|
||||
block_regex: /\.evolok\.net\//,
|
||||
exception: [{
|
||||
domain: "dvhn.nl",
|
||||
allow_cookies: 1,
|
||||
block_regex: /(\.evolok\.net\/|\.ndcmediagroep\.nl\/js\/evolok\/)/
|
||||
}
|
||||
]
|
||||
},
|
||||
"MediaNews Group": {
|
||||
domain: "###_usa_mng",
|
||||
|
@ -2383,10 +2390,10 @@ var no_nhst_media_domains = grouped_sites['###_no_nhst_media'];
|
|||
|
||||
// custom domains (background)
|
||||
var custom_flex_not = {
|
||||
"###": ["gitlab.com"],
|
||||
"###_ca_postmedia": ["canada.com", "canoe.com", "driving.ca"],
|
||||
"###_de_dfv_medien": ["dfv.de"],
|
||||
"###_de_madsack": ["madsack.de", "madsack-medien-campus.de"],
|
||||
"###_nl_mediahuis_noord": ["dvhn.nl"],
|
||||
"###_wp_leaky_paywall": ["griffithreview.com", "nknews.org", "thewirechina.com"],
|
||||
"###_medium_custom": ["medium.com"],
|
||||
"###_uk_axate.io": ["thinkofx.net"],
|
||||
|
@ -2400,7 +2407,7 @@ var custom_flex_not_domains;
|
|||
|
||||
function init_custom_flex_domains() {
|
||||
custom_flex_domains = [];
|
||||
custom_flex_not_domains = [].concat.apply([], Object.values(custom_flex_not)).concat(['gitlab.com']);
|
||||
custom_flex_not_domains = [].concat.apply([], Object.values(custom_flex_not));
|
||||
}
|
||||
init_custom_flex_domains();
|
||||
|
||||
|
@ -2408,4 +2415,4 @@ init_custom_flex_domains();
|
|||
var au_news_corp_nofix_domains = ['cairnspost.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'thechronicle.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au'];
|
||||
var be_mediahuis_nofix_domains = ['gva.be', 'hbvl.be', 'nieuwsblad.be', 'standaard.be'];
|
||||
var it_gedi_nofix_domains = ['gelocal.it', 'huffingtonpost.it', 'ilsecoloxix.it', 'lastampa.it', 'limesonline.com', 'repubblica.it'];
|
||||
var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'catalyst-journal.com', 'courrierinternational.com', 'dn.se', 'dvhn.nl', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'golem.de', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kurier.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'letemps.ch', 'liberation.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'ouest-france.fr', 'philonomist.com', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'ruhrnachrichten.de', 'saarbruecker-zeitung.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'weser-kurier.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(au_news_corp_nofix_domains, be_mediahuis_nofix_domains, it_gedi_nofix_domains);
|
||||
var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'catalyst-journal.com', 'courrierinternational.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'golem.de', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kurier.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'letemps.ch', 'liberation.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'ouest-france.fr', 'philonomist.com', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'ruhrnachrichten.de', 'saarbruecker-zeitung.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'weser-kurier.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(au_news_corp_nofix_domains, be_mediahuis_nofix_domains, it_gedi_nofix_domains);
|
||||
|
|
Loading…
Reference in a new issue