Fix DHnet.be, L'Avenir & LaLibre.be

This commit is contained in:
magnolia1234 2023-03-29 13:03:10 +02:00
parent fdf81a9429
commit ea65a3a266
8 changed files with 50 additions and 37 deletions

View file

@ -443,11 +443,9 @@ Grouped in options:\
[Challenges](https://www.challenges.fr) -
[Charlie Hebdo](https://charliehebdo.fr) -
[Connaissance des Arts](https://www.connaissancedesarts.com) -
[DH Les Sports+](https://www.dhnet.be) -
[Elle](https://www.elle.fr) -
[Esprit](https://esprit.presse.fr) -
[Franc-Tireur](https://www.franc-tireur.fr) -
[L'Avenir](https://www.lavenir.net) -
[L'Écho](https://lecho.be) -
[L'Express](https://www.lexpress.fr) -
[L'Humanité](https://www.humanite.fr) -
@ -456,7 +454,6 @@ Grouped in options:\
[L'Oeil de la Photographie (fr/en)](https://loeildelaphotographie.com) -
[L'Usine Nouvelle](https://www.usinenouvelle.com) -
[La Croix](https://www.la-croix.com) -
[La Libre](https://www.lalibre.be) -
[La Nouvelle République du Centre-Ouest](https://www.lanouvellerepublique.fr) -
[La Tribune](https://www.latribune.fr) -
[Le Courrier des Stratèges](https://lecourrierdesstrateges.fr) -
@ -492,6 +489,10 @@ Grouped in options:\
[Le Progrès](https://www.leprogres.fr) -
[Le Républicain Lorrain](https://www.republicain-lorrain.fr) -
[Vosges Matin](https://www.vosgesmatin.fr)\
*Groupe IPM* sites like\
[DH Les Sports+](https://www.dhnet.be) -
[L'Avenir](https://www.lavenir.net) -
[La Libre](https://www.lalibre.be)\
*Groupe La Dépêche* sites like\
[Centre Presse](https://www.centrepresseaveyron.fr) -
[L'Indépendant](https://www.lindependant.fr) -

View file

@ -412,7 +412,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 = ['###_ar_grupo_clarin', '###_be_roularta', '###_de_mh_aachen', '###_de_noz_mhn', '###_uk_nat_world'];
let new_groups = ['###_ar_grupo_clarin', '###_be_groupe_ipm', '###_be_roularta', '###_de_mh_aachen', '###_de_noz_mhn', '###_uk_nat_world'];
let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain))) ||
(enabledSites.includes('tinypass.com') && !enabledSites.includes('piano.io'));
if (open_options)

View file

@ -5,6 +5,7 @@ Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/release
Post-release
Add TagesAnzeiger.ch (link to archive.is)
Fix BusinessPost.ie (json)
Fix DHnet.be, L'Avenir & LaLibre.be (Add Groupe IPM)
Fix The Spectator World (new domain)
Fix TownNews sites (js)

View file

@ -4,7 +4,8 @@ var domain;
var csDone = false;
var csDoneOnce = false;
var ar_grupo_clarin_domains =['clarin.com', 'lavoz.com.ar', 'losandes.com.ar'];
var ar_grupo_clarin_domains = ['clarin.com', 'lavoz.com.ar', 'losandes.com.ar'];
var be_groupe_ipm_domains = ['dhnet.be', 'lalibre.be', 'lavenir.net'];
var be_roularta_domains = ['artsenkrant.com', 'femmesdaujourdhui.be', 'flair.be', 'knack.be', 'kw.be', 'levif.be', 'libelle.be'];
var ca_gcm_domains = ['lesoleil.com'].concat(['latribune.ca', 'lavoixdelest.ca', 'ledroit.com', 'ledroitfranco.com', 'lenouvelliste.ca', 'lequotidien.com']);
var ca_torstar_domains = ['niagarafallsreview.ca', 'stcatharinesstandard.ca', 'thepeterboroughexaminer.com', 'therecord.com', 'thespec.com', 'thestar.com', 'wellandtribune.ca'];
@ -1234,7 +1235,7 @@ else if (matchDomain('politicaexterior.com')) {
else
csDone = true;
} else if (window.location.hostname.endsWith('.fr') || matchDomain(['bienpublic.com', 'connaissancedesarts.com', 'journaldunet.com', 'la-croix.com', 'lavenir.net', 'ledauphine.com', 'lesinrocks.com', 'lejsl.com', 'lesoir.be', 'loeildelaphotographie.com', 'marianne.net', 'nouvelobs.com', 'parismatch.com', 'science-et-vie.com', 'sudinfo.be'].concat(fr_groupe_nice_matin_domains))) {//france
} else if (window.location.hostname.endsWith('.fr') || matchDomain(['bienpublic.com', 'connaissancedesarts.com', 'journaldunet.com', 'la-croix.com', 'ledauphine.com', 'lesinrocks.com', 'lejsl.com', 'lesoir.be', 'loeildelaphotographie.com', 'marianne.net', 'nouvelobs.com', 'parismatch.com', 'science-et-vie.com', 'sudinfo.be'].concat(fr_groupe_nice_matin_domains))) {//france
if (matchDomain('alternatives-economiques.fr')) {
window.setTimeout(function () {
@ -1436,18 +1437,6 @@ else if (matchDomain('lanouvellerepublique.fr')) {
removeDOMElement(alert_didacticiel, ...loading);
}
else if (matchDomain('lavenir.net')) {
let paywall = document.querySelector('div.is-preview');
if (paywall) {
removeDOMElement(paywall);
let div_hidden = document.querySelector('div.is-hidden');
if (div_hidden)
div_hidden.classList.remove('is-hidden');
}
let ads = document.querySelectorAll('div.ap-AdContainer');
removeDOMElement(...ads);
}
else if (matchDomain('lecourrierdesstrateges.fr')) {
window.setTimeout(function () {
let paywall = document.querySelector('div.jpw-truncate-btn');
@ -1961,9 +1950,23 @@ else if (matchDomain(it_gedi_domains)) {
else
csDone = true;
} else if (window.location.hostname.match(/\.(be|nl)$/) || matchDomain(['artsenkrant.com'])) {//belgium/netherlands
} else if (window.location.hostname.match(/\.(be|nl)$/) || matchDomain(['artsenkrant.com', 'lavenir.net'])) {//belgium/netherlands
if (matchDomain('fd.nl')) {
if (matchDomain(be_groupe_ipm_domains)) {
let paywall = document.querySelector('div.is-preview');
if (paywall) {
paywall.classList.remove('is-preview');
window.setTimeout(function () {
let div_hidden = document.querySelector('div.is-hidden');
if (div_hidden)
div_hidden.classList.remove('is-hidden');
}, 1000);
}
let ads = document.querySelectorAll('div.ap-AdContainer, div.ap-Outbrain');
removeDOMElement(...ads);
}
else if (matchDomain('fd.nl')) {
let reg_modal = document.querySelector('div.modal.upsell');
if (reg_modal)
refreshCurrentTab();
@ -4990,7 +4993,7 @@ function refreshCurrentTab() {
ext_api.runtime.sendMessage({request: 'refreshCurrentTab'});
}
function archiveLink(url, text_fail = 'BPC > Full article text:\r\n') {
function archiveLink(url, text_fail = 'BPC > Full article text (only report issue if not working for over a week):\r\n') {
return externalLink(['archive.today', 'archive.is'], 'https://{domain}?run=1&url={url}', url, text_fail);
}

View file

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.1.1.3"
"version": "3.1.1.4"
}

View file

@ -745,5 +745,5 @@
"*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.1.1.3"
"version": "3.1.1.4"
}

View file

@ -404,11 +404,6 @@ var defaultSites = {
domain: "aerzteblatt.de",
allow_cookies: 1
},
"DH Les Sports+": {
domain: "dhnet.be",
allow_cookies: 1,
useragent: "googlebot"
},
"Diario Financiero": {
domain: "df.cl",
allow_cookies: 1,
@ -705,6 +700,16 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /(\.poool\.fr\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/
},
"Groupe IPM": {
domain: "###_be_groupe_ipm",
group: [
"dhnet.be",
"lalibre.be",
"lavenir.net"
],
allow_cookies: 1,
block_regex: /(\.piano\.io\/xbuilder\/experience\/execute|cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/
},
"Groupe La Dépêche": {
domain: "###_fr_groupe_la_depeche",
group: [
@ -1020,10 +1025,6 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /cdn\.cxense\.com\//
},
"L'Avenir": {
domain: "lavenir.net",
allow_cookies: 1
},
"L'Écho": {
domain: "lecho.be",
referer: "google"
@ -1067,11 +1068,6 @@ var defaultSites = {
domain: "gazzetta.it",
allow_cookies: 1
},
"La Libre.be": {
domain: "lalibre.be",
allow_cookies: 1,
useragent: "googlebot"
},
"La Nación (free articles only)": {
domain: "lanacion.com.ar"
},

View file

@ -4,6 +4,12 @@
"allow_cookies": 1,
"block_regex": "\\.automobilwoche\\.de\\/s3fs-public\\/js\\/js_nCw.+\\.js"
},
"DH Les Sports+": {
"domain": "dhnet.be",
"allow_cookies": 1,
"block_regex": "(\\.piano\\.io\\/xbuilder\\/experience\\/execute|cdn\\.cxense\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)",
"cs_code": "[{\"cond\":\".is-preview\",\"rm_class\":\"is-preview\"},{\"cond\":\".is-hidden\",\"rm_class\":\"is-hidden\"}]"
},
"Euromoney": {
"domain": "euromoney.com",
"allow_cookies": 1,
@ -23,6 +29,12 @@
"domain": "inkl.com",
"cs_code": "[{\"cond\":\"div.paywall\",\"rm_attrib\":\"class\"}]"
},
"La Libre.be": {
"domain": "lalibre.be",
"allow_cookies": 1,
"block_regex": "(\\.piano\\.io\\/xbuilder\\/experience\\/execute|cdn\\.cxense\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)",
"cs_code": "[{\"cond\":\".is-preview\",\"rm_class\":\"is-preview\"},{\"cond\":\".is-hidden\",\"rm_class\":\"is-hidden\"}]"
},
"Le Figaro (link to archive.is)": {
"domain": "lefigaro.fr",
"allow_cookies": 1,