From 4179a795e325968a4ddcddfb0b1ad979e85c9c9e Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 25 Jan 2020 18:19:36 +0100 Subject: [PATCH] Add Chemical & Engineering News --- README.md | 1 + contentScript.js | 8 +++++++- sites.json | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 49ad3c3..a65b5a1 100755 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ Visit the [Firefox repository](https://github.com/magnolia1234/bypass-paywalls-f ##### Sports [The Athletic](https://theathletic.com) ##### Tech/Science +[Chemical & Engineering News](https://cen.acs.org) - [Dark Reading](https://darkreading.com) - [MIT Technology Review](https://www.technologyreview.com) - [Towards Data Science](https://www.towardsdatascience.com) - diff --git a/contentScript.js b/contentScript.js index 52258c5..5bdc82e 100755 --- a/contentScript.js +++ b/contentScript.js @@ -12,7 +12,6 @@ if (location.hostname.endsWith('rep.repubblica.it')) { if (location.href.includes('/pwa/')) { location.href = location.href.replace('/pwa/', '/ws/detail/'); } - if (location.href.includes('/ws/detail/')) { const paywall = document.querySelector('.paywall[subscriptions-section="content"]'); if (paywall) { @@ -390,6 +389,13 @@ if (window.location.href.indexOf("folha.uol.com.br") !== -1) { removeDOMElement(signup); } +if (window.location.href.indexOf("cen.acs.org") !== -1) { + document.addEventListener('DOMContentLoaded', () => { + const meteredBar = document.querySelector('.meteredBar'); + removeDOMElement(meteredBar); + }); +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/sites.json b/sites.json index bda0da0..5516371 100644 --- a/sites.json +++ b/sites.json @@ -8,6 +8,7 @@ "Business Insider": "businessinsider.com", "Caixin Global": "caixinglobal.com", "Challenges": "challenges.fr", + "Chemical & Engineering News": "cen.acs.org", "Chicago Tribune": "chicagotribune.com", "Corriere Della Sera": "corriere.it", "Dagens Nyheter (free articles only)": "dn.se",