mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:41:57 +01:00
Remove Lequipe.fr (fix obsolete)
This commit is contained in:
parent
27eaf10d23
commit
3e034fdd37
6 changed files with 2 additions and 69 deletions
|
@ -446,7 +446,6 @@ Grouped in options:\
|
|||
[Franc-Tireur](https://www.franc-tireur.fr) -
|
||||
[L'Avenir](https://www.lavenir.net) -
|
||||
[L'Écho](https://lecho.be) -
|
||||
[L'Équipe](https://www.lequipe.fr) -
|
||||
[L'Express](https://www.lexpress.fr) -
|
||||
[L'Humanité](https://www.humanite.fr) -
|
||||
[L'Informé](https://www.linforme.com) -
|
||||
|
|
|
@ -24,7 +24,6 @@ var restrictions = {
|
|||
'elespanol.com': /^((?!\/cronicaglobal\.elespanol\.com\/).)*$/,
|
||||
'espn.com': /^((?!espn\.com\/watch).)*$/,
|
||||
'esquire.com': /^((?!\/classic\.esquire\.com\/).)*$/,
|
||||
'lequipe.fr': /^((?!\.lequipe\.fr\/.+\/les-notes\/).)*$/,
|
||||
'nknews.org': /^((?!nknews\.org\/pro\/).)*$/,
|
||||
'nytimes.com': /^((?!\/timesmachine\.nytimes\.com\/).)*$/,
|
||||
'science.org': /^((?!\.science\.org\/doi\/).)*$/,
|
||||
|
|
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
|
|||
Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
|
||||
|
||||
Post-release
|
||||
Remove Lequipe.fr (fix obsolete)
|
||||
Fix NK News (pro)
|
||||
Fix Quartz (newsletter)
|
||||
|
||||
|
|
|
@ -1641,66 +1641,6 @@ else if (matchDomain('lepoint.fr')) {
|
|||
}, 1000);
|
||||
}
|
||||
|
||||
|
||||
else if (matchDomain('lequipe.fr')) {
|
||||
let paywall = document.querySelectorAll('.Paywall, .Article__paywall');
|
||||
if (window.location.pathname.includes('/Article/') && paywall.length) {
|
||||
let scripts = document.querySelectorAll('script:not([src], [type])');
|
||||
let json_script;
|
||||
for (let script of scripts) {
|
||||
if (script.innerText.includes('window.__NUXT__=')) {
|
||||
json_script = script;
|
||||
break;
|
||||
}
|
||||
}
|
||||
let article = document.querySelector('div.article__body');
|
||||
if (article && json_script) {
|
||||
if (json_script.innerText.includes('articleObject:')) {
|
||||
removeDOMElement(...paywall);
|
||||
let json = json_script.textContent.split('articleObject:')[1].split(',articleType')[0];
|
||||
let url_nuxt = json_script.textContent.split('comment_count_url:"')[1].split('",')[0].replace(/\\u002F/g, '/');
|
||||
if (url_nuxt && !url_nuxt.includes(window.location.pathname))
|
||||
window.setTimeout(function () {
|
||||
refreshCurrentTab();
|
||||
}, 500);
|
||||
json = json.replace(/keywords:\[([\w\,\$]+)\]/g, "keywords:\"\"").replace(/([{,])([a-zA-Z_]+\d?):/g, "$1\"$2\":").replace(/\":(\[)?([\w\$\.]+)([\]},])/g, "\":$1\"$2\"$3").replace(/},([\w]+),{/g, "},\"$1\",{").replace(/}(,\w{2})+(\]}|,{)/g, "}$2");
|
||||
json = JSON.parse(json);
|
||||
if (json.items) {
|
||||
let pars = json.items.filter(x => x.objet && x.objet.paragraphs)[0].objet.paragraphs;
|
||||
article.innerHTML = '';
|
||||
let article_dom;
|
||||
let article_text = '';
|
||||
let parser = new DOMParser();
|
||||
for (let par of pars) {
|
||||
if (par.title || par.content) {
|
||||
if (par.title && par.title.length > 2)
|
||||
article_text += '<p><strong>' + par.title + '</strong></p>';
|
||||
if (par.content && par.content.length > 2) {
|
||||
let par_content = par.content.replace('class=', '').replace(/\\u003C/g, '<').replace(/\\u003E/g, '>').replace(/\\u002F/g, '/').replace(/\\"/g, '"').replace(/(^\"|\"$)/g, '').replace(/\\t/g, '');
|
||||
article_text += '<p>' + par_content + '</p>';
|
||||
}
|
||||
} else if (par.media && par.media.url && par.media.ratio) {
|
||||
let ratio = par.media.ratio;
|
||||
if (!parseInt(ratio))
|
||||
ratio = 1.5;
|
||||
let url = par.media.url.replace(/\\u002F/g, '/').replace('{width}', '400').replace('{height}', parseInt(400 / ratio)).replace('{quality}', '75');
|
||||
article_text += '<p><img src="' + url + '" style="width:95%;"</img></p>';
|
||||
if (par.media.legende && par.media.legende.length > 2)
|
||||
article_text += '<p><strong>' + par.media.legende + '</strong></p>';
|
||||
} else if (par.__type && !par.layout)
|
||||
console.log(par);
|
||||
}
|
||||
article_dom = parser.parseFromString('<div style="margin:20px; font-family:DINNextLTPro-Regular,sans-serif; font-size:18px;">' + article_text + '</div>', 'text/html');
|
||||
article.appendChild(article_dom.querySelector('div'));
|
||||
}
|
||||
} else
|
||||
window.setTimeout(function () {
|
||||
refreshCurrentTab();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('lesechos.fr')) {
|
||||
if (window.location.pathname.startsWith('/amp/')) {
|
||||
ampToHtml();
|
||||
|
|
|
@ -379,7 +379,6 @@
|
|||
"*://*.leparisien.fr/*",
|
||||
"*://*.lepoint.fr/*",
|
||||
"*://*.leprogres.fr/*",
|
||||
"*://*.lequipe.fr/*",
|
||||
"*://*.lescienze.it/*",
|
||||
"*://*.lesechos.fr/*",
|
||||
"*://*.lesinrocks.com/*",
|
||||
|
|
7
sites.js
7
sites.js
|
@ -1013,11 +1013,6 @@ var defaultSites = {
|
|||
domain: "lecho.be",
|
||||
referer: "google"
|
||||
},
|
||||
"L'Équipe": {
|
||||
domain: "lequipe.fr",
|
||||
allow_cookies: 1,
|
||||
block_regex: /\.lequipe\.fr\/commons\/lequipe-paywall\/pagePaywall\.js/
|
||||
},
|
||||
"L'Express": {
|
||||
domain: "lexpress.fr",
|
||||
allow_cookies: 1,
|
||||
|
@ -2468,4 +2463,4 @@ init_custom_flex_domains();
|
|||
var au_news_corp_nofix_domains = ['cairnspost.com.au', 'geelongadvertiser.com.au', 'townsvillebulletin.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 = ['aamulehti.fi', 'africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'catalyst-journal.com', 'courrierinternational.com', 'diepresse.com', 'dn.no', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'golem.de', 'handelsblatt.com', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'letemps.ch', 'liberation.fr', 'lopinion.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'mondediplo.com', 'moneycontrol.com', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'nwzonline.de', 'ouest-france.fr', 'philonomist.com', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'stimme.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', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(au_news_corp_nofix_domains, be_mediahuis_nofix_domains, it_gedi_nofix_domains);
|
||||
var nofix_sites = ['aamulehti.fi', 'africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'catalyst-journal.com', 'courrierinternational.com', 'diepresse.com', 'dn.no', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'golem.de', 'handelsblatt.com', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'lopinion.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'mondediplo.com', 'moneycontrol.com', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'nwzonline.de', 'ouest-france.fr', 'philonomist.com', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'stimme.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', 'wiwo.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