Add Marianne (France)

This commit is contained in:
magnolia1234 2021-10-20 21:46:42 +02:00
parent 8b6906f1ed
commit 34b4bb4023
6 changed files with 26 additions and 3 deletions

View file

@ -303,6 +303,7 @@ Grouped in options:\
[Le Télégramme](https://www.letelegramme.fr) -
[Les Échos](https://www.lesechos.fr) -
[Libération](https://www.liberation.fr)* -
[Marianne](https://www.marianne.net) -
[Paris Match](https://www.parismatch.com) -
[Science & Vie](https://www.science-et-vie.com) -
[Sciences et Avenir](https://www.sciencesetavenir.fr) -

View file

@ -110,6 +110,7 @@ var allow_cookies_default = [
'livelaw.in',
'loeildelaphotographie.com',
'lrb.co.uk',
'marianne.net',
'marketwatch.com',
'medianama.com',
'medium.com',
@ -362,6 +363,7 @@ var blockedRegexes = {
'loeildelaphotographie.com': /cdn\.loeildelaphotographie\.com\/wp-content\/.+\/hague-child\/js\/script-.+\.js/,
'lopinion.fr': /\.poool\.fr\//,
'lrb.co.uk': /\.tinypass\.com\//,
'marianne.net': /\.poool\.fr\//,
'marketwatch.com': /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad|subscriptions)-.+\.js)/,
'mercuriovalpo.cl': /(.+\.mercuriovalpo\.cl\/impresa\/.+\/assets\/(vendor|\d)\.js|pram\.pasedigital\.cl\/API\/User\/Status\?)/,
'mexiconewsdaily.com': /\.mexiconewsdaily\.com\/c\/assets\/pigeon\.js/,
@ -1384,7 +1386,7 @@ if (matchUrlDomain(change_headers, details.url) && (!['font', 'image', 'styleshe
}
if ((!['font', 'stylesheet'].includes(details.type) || matchUrlDomain(cs_limit_except, currentTabUrl)) && !csDone) {
let lib_file = 'lib/empty.js';
if (matchUrlDomain(['bloomberg.com', 'cicero.de', 'economictimes.com', 'lesechos.fr', 'newleftreview.org', 'newyorker.com', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'sudouest.fr', 'techinasia.com', 'valor.globo.com', 'washingtonpost.com'].concat(nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains), currentTabUrl))
if (matchUrlDomain(['bloomberg.com', 'cicero.de', 'economictimes.com', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newyorker.com', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'sudouest.fr', 'techinasia.com', 'valor.globo.com', 'washingtonpost.com'].concat(nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains), currentTabUrl))
lib_file = 'lib/purify.min.js';
var bg2csData = {
optin_setcookie: optin_setcookie,

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Marianne (France)
Remove Sueddeutsche Zeitung (obsolete)
Fix ABC.es (Evolok)
Fix Bloomberg (charts)

View file

@ -793,7 +793,7 @@ else if (matchDomain('politicaexterior.com')) {
else
csDone = true;
} else if (window.location.hostname.endsWith('.fr') || matchDomain(['bienpublic.com', 'journaldunet.com', 'la-croix.com', 'ledauphine.com', 'ledevoir.com', 'lejsl.com', 'loeildelaphotographie.com', 'nouvelobs.com', 'parismatch.com'])) {//france
} else if (window.location.hostname.endsWith('.fr') || matchDomain(['bienpublic.com', 'journaldunet.com', 'la-croix.com', 'ledauphine.com', 'ledevoir.com', 'lejsl.com', 'loeildelaphotographie.com', 'marianne.net', 'nouvelobs.com', 'parismatch.com'])) {//france
if (matchDomain('alternatives-economiques.fr')) {
window.setTimeout(function () {
@ -992,6 +992,23 @@ else if (matchDomain('loeildelaphotographie.com')) {
blurred_image.removeAttribute('style');
}
else if (matchDomain('marianne.net')) {
let paywall = document.querySelector('div.paywall');
if (paywall) {
let article_source = document.querySelector('div.article-body[data-content-src]');
if (article_source) {
let article_text = decode_utf8(atob(article_source.getAttribute('data-content-src')));
let parser = new DOMParser();
let html = parser.parseFromString('<div>' + DOMPurify.sanitize(article_text) + '</div>', 'text/html');
let article = html.querySelector('div');
article_source.innerHTML = '';
article_source.appendChild(article);
article_source.removeAttribute('data-content-src');
}
removeDOMElement(paywall);
}
}
else if (matchDomain('nouvelobs.com')) {
let paywall = document.querySelector('.paywall');
removeDOMElement(paywall);

View file

@ -315,6 +315,7 @@
"*://*.lunion.fr/*",
"*://*.lvz.de/*",
"*://*.marca.com/*",
"*://*.marianne.net/*",
"*://*.marketwatch.com/*",
"*://*.marmai.fi/*",
"*://*.maz-online.de/*",
@ -555,5 +556,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.4.0.2"
"version": "2.4.0.4"
}

View file

@ -158,6 +158,7 @@ var defaultSites =
"Los Angeles Times": "latimes.com",
"Madsack Mediengruppe (Germany)": "###_de_madsack",
"Marca": "marca.com",
"Marianne.net": "marianne.net",
"MarketWatch": "marketwatch.com",
"McClatchy Group": "###_usa_mcc",
"Mediahuis Nederland Regional": "###_nl_mediahuis_region",