From 0de57adeabedffe9c027fd81fecd3f124f3a21b2 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Thu, 23 Mar 2023 19:07:21 +0100 Subject: [PATCH] Add Le Figaro (link to archive.is) --- README.md | 1 + changelog.txt | 1 + contentScript.js | 11 +++++++++++ custom/manifest.json | 2 +- manifest.json | 3 ++- sites.js | 6 +++++- sites_updated.json | 7 +++++++ 7 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ef5bc26..e413903 100644 --- a/README.md +++ b/README.md @@ -460,6 +460,7 @@ Grouped in options:\ [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) - +[Le Figaro (link to archive.is)](https://www.lefigaro.fr) - [Le Journal du Dimanche](https://lejdd.fr) - [Le Journal du Net](https://www.journaldunet.com) - [Le Nouvel Economiste](https://www.lenouveleconomiste.fr) - diff --git a/changelog.txt b/changelog.txt index 6927ddd..a9dac0d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases Post-release +Add Le Figaro (link to archive.is) Remove Cellesche Zeitung (fix obsolete) Fix Automobilwoche.de (js) Fix Faz.net (json) diff --git a/contentScript.js b/contentScript.js index 392b833..2526611 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1467,6 +1467,17 @@ else if (matchDomain('lecourrierdesstrateges.fr')) { }, 500); } +else if (matchDomain('lefigaro.fr')) { + let url = window.location.href; + let paywall = document.querySelector('div#fig-premium-paywall'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('article'); + if (article) + article.firstChild.before(archiveLink(url)); + } +} + else if (matchDomain(['lejdd.fr', 'parismatch.com', 'public.fr'])) { let poool_banner = document.querySelector('#poool-container'); let poool_widget = document.querySelector('#poool-widget-content'); diff --git a/custom/manifest.json b/custom/manifest.json index c0d7da9..a56951c 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.1.0.5" + "version": "3.1.0.6" } diff --git a/manifest.json b/manifest.json index fe88cd4..fe92228 100644 --- a/manifest.json +++ b/manifest.json @@ -371,6 +371,7 @@ "*://*.lecourrierdesstrateges.fr/*", "*://*.ledauphine.com/*", "*://*.ledevoir.com/*", + "*://*.lefigaro.fr/*", "*://*.lehighvalleylive.com/*", "*://*.leidschdagblad.nl/*", "*://*.lejdd.fr/*", @@ -739,5 +740,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.1.0.5" + "version": "3.1.0.6" } diff --git a/sites.js b/sites.js index eed81cc..ace6cca 100644 --- a/sites.js +++ b/sites.js @@ -1123,6 +1123,10 @@ var defaultSites = { block_regex: /\.tinypass\.com\//, remove_cookies_select_drop: ["pw6"] }, + "Le Figaro (link to archive.is)": { + domain: "lefigaro.fr", + allow_cookies: 1 + }, "Le Journal du Dimanche": { domain: "lejdd.fr", allow_cookies: 1, @@ -2465,4 +2469,4 @@ var au_news_corp_nofix_domains = ['cairnspost.com.au', 'geelongadvertiser.com.au var be_mediahuis_nofix_domains = ['gva.be', 'hbvl.be', 'nieuwsblad.be', 'standaard.be']; var de_rp_medien_nofix_domains = ['ga.de', 'rp-online.de', 'saarbruecker-zeitung.de', 'volksfreund.de']; 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', 'caravanmagazine.in', 'catalyst-journal.com', 'courrierinternational.com', 'diepresse.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'golem.de', 'handelsblatt.com', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', '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', 'rheinpfalz.de', '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', 'thedispatch.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'welt.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(au_news_corp_nofix_domains, be_mediahuis_nofix_domains, de_rp_medien_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', 'caravanmagazine.in', 'catalyst-journal.com', 'courrierinternational.com', 'diepresse.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'golem.de', 'handelsblatt.com', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', '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', 'rheinpfalz.de', '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', 'thedispatch.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'welt.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(au_news_corp_nofix_domains, be_mediahuis_nofix_domains, de_rp_medien_nofix_domains, it_gedi_nofix_domains); diff --git a/sites_updated.json b/sites_updated.json index 6c3c260..b2c2626 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -29,6 +29,13 @@ "domain": "inkl.com", "cs_code": "[{\"cond\":\"div.paywall\",\"rm_attrib\":\"class\"}]" }, + "Le Figaro (link to archive.is)": { + "domain": "lefigaro.fr", + "allow_cookies": 1, + "add_ext_link": "div#fig-premium-paywall", + "add_ext_link_type": "archive.is", + "new_site": 1 + }, "New Scientist": { "domain": "newscientist.com", "allow_cookies": 1,