From a9efd4652136cdb0b5c7ec40d5272f6127409bbf Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 15 Nov 2020 14:15:12 +0100 Subject: [PATCH] Add AlternativesEconomiques.fr --- README.md | 1 + background.js | 2 ++ changelog.txt | 1 + contentScript.js | 10 ++++++++++ manifest.json | 1 + sites.js | 1 + 6 files changed, 16 insertions(+) diff --git a/README.md b/README.md index ca61ca2..addbb95 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,7 @@ So don't update to Firefox 79 or use Firefox Nightly (and load BPC from a custom [The Times](https://www.thetimes.co.uk) - [The Times Literary Supplement](https://www.the-tls.co.uk) ##### France/Wallonia +[Alternatives Economiques](https://www.alternatives-economiques.fr) - [Challenges](https://www.challenges.fr) – [Charlie Hebdo](https://charliehebdo.fr) - [L'Écho](https://lecho.be) - diff --git a/background.js b/background.js index 1c473ff..b63e5f0 100644 --- a/background.js +++ b/background.js @@ -170,6 +170,7 @@ var use_bing_bot = [ var blockedRegexes = { 'adweek.com': /.+\.lightboxcdn\.com\/.+/, 'afr.com': /afr\.com\/assets\/vendorsReactRedux_client.+\.js/, + 'alternatives-economiques.fr': /.+\.poool\.fr\/.+/, 'americanbanker.com': /.+\.tinypass\.com\/.+/, 'barrons.com': /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/, 'belfasttelegraph.co.uk': /cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js/, @@ -246,6 +247,7 @@ var blockedRegexes = { 'science-et-vie.com': /.+\.qiota\.com\/.+/, 'sciencesetavenir.fr': /.+\.poool\.fr\/.+/, 'scmp.com': /.+\.tinypass\.com\/.+/, + 'seekingalpha.com': /.+\.tinypass\.com\/.+/, 'sfchronicle.com': /.+\.blueconic\.net\/.+/, 'slate.com': /(cdn\.cxense\.com\/.+|.+\.tinypass\.com\/.+)/, 'sloanreview.mit.edu': /(cdn\.tinypass\.com\/.+|.+\/sloanreview\.mit\.edu\/.+\/welcome-ad\.js)/, diff --git a/changelog.txt b/changelog.txt index 100ea74..90eb5bd 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add AlternativesEconomiques.fr Add La Estrella de Valparaiso (Chile) Fix-update Folha de S. Paulo (MatherAnalytics) Fix-update Gazet van Antwerpen (video/maps) diff --git a/contentScript.js b/contentScript.js index a687bde..5c47fcb 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1530,6 +1530,16 @@ else if (matchDomain('deutsche-wirtschafts-nachrichten.de')) { }, 500); // Delay (in milliseconds) } +else if (matchDomain("alternatives-economiques.fr")) { + window.setTimeout(function () { + let paywall = document.querySelector('#temp-paywall'); + removeDOMElement(paywall); + let data_ae_poool = document.querySelector('div[data-ae-poool]'); + if (data_ae_poool) + data_ae_poool.removeAttribute('style'); + }, 500); // Delay (in milliseconds) +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/manifest.json b/manifest.json index 52a2547..e90e46b 100644 --- a/manifest.json +++ b/manifest.json @@ -45,6 +45,7 @@ "*://*.adweek.com/*", "*://*.afr.com/*", "*://*.aftonbladet.se/*", + "*://*.alternatives-economiques.fr/*", "*://*.americanaffairsjournal.org/*", "*://*.americanbanker.com/*", "*://*.asia.nikkei.com/*", diff --git a/sites.js b/sites.js index f2c9e78..54f6b48 100644 --- a/sites.js +++ b/sites.js @@ -4,6 +4,7 @@ var defaultSites = "Adweek": "adweek.com", "Aftonbladet": "aftonbladet.se", "Algemeen Dagblad (+ regional)": "ad.nl", + "Alternatives Economiques": "alternatives-economiques.fr", "American Affairs": "americanaffairsjournal.org", "American Banker": "americanbanker.com", "Atavist Magazine": "atavist.com",