From 4104cd3f65e9a9a2fe1006732976da4aec68f1fd Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 25 Sep 2020 14:59:06 +0200 Subject: [PATCH] Add Times Higher Education --- README.md | 5 +++-- background.js | 1 + contentScript.js | 13 +++++++++++++ lp/manifest.json | 3 ++- manifest.json | 2 +- sites.js | 1 + 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index aa4aafd..6f4e27b 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,10 @@ So don't update to Firefox 79 or use F-droid's [Fennec-release](https://f-droid. [MIT Technology Review](https://www.technologyreview.com) - [National Geographic USA](https://www.nationalgeographic.com) - [Nautilus](https://nautil.us) - +[Scientific American](https://www.scientificamerican.com)* - +[Times Higher Education](https://www.timeshighereducation.com) - [Towards Data Science](https://www.towardsdatascience.com) - -[Wired](https://www.wired.com) - -[Scientific American](https://www.scientificamerican.com)* +[Wired](https://www.wired.com) #### Encyclopedia/Book library/Knowledge base [BBC History Extra](https://www.historyextra.com) - diff --git a/background.js b/background.js index 8a08348..21c423b 100644 --- a/background.js +++ b/background.js @@ -72,6 +72,7 @@ var allow_cookies = [ 'the-american-interest.com', 'thehindu.com', 'themarker.com', +'timeshighereducation.com', 'trouw.nl', 'variety.com', 'volkskrant.nl', diff --git a/contentScript.js b/contentScript.js index 080e704..976e281 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1107,6 +1107,19 @@ else if (matchDomain("nationalreview.com")) { }); } +else if (matchDomain("timeshighereducation.com")) { + let paywall_cta = document.querySelector('div.paywall-cta'); + if (paywall_cta) { + paywall_cta.removeAttribute('style'); + let hidden_divs = document.querySelectorAll('div[style="display: none;"]'); + for (let hidden_div of hidden_divs) + hidden_div.removeAttribute('style'); + let paywall_fade = document.querySelector('div.paywall-fade'); + if (paywall_fade) + paywall_fade.classList.remove('paywall-fade'); + } +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/lp/manifest.json b/lp/manifest.json index c2c569f..83be1ba 100644 --- a/lp/manifest.json +++ b/lp/manifest.json @@ -250,6 +250,7 @@ "*://*.thestar.com/*", "*://*.thetimes.co.uk/*", "*://*.tijd.be/*", + "*://*.timeshighereducation.com/*", "*://*.towardsdatascience.com/*", "*://*.townsvillebulletin.com.au/*", "*://*.trouw.nl/*", @@ -310,5 +311,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.8.7.2" + "version": "1.8.7.3" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index c6a95d9..1c68d3d 100644 --- a/manifest.json +++ b/manifest.json @@ -40,5 +40,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.8.7.2" + "version": "1.8.7.3" } \ No newline at end of file diff --git a/sites.js b/sites.js index 428d9be..3fa176e 100644 --- a/sites.js +++ b/sites.js @@ -186,6 +186,7 @@ var defaultSites = "The Toronto Star": "thestar.com", "The Wall Street Journal (not Chinese)": "wsj.com", "The Washington Post": "washingtonpost.com", + "Times Higher Education": "timeshighereducation.com", "Towards Data Science": "towardsdatascience.com", "Trouw": "trouw.nl", "Valeurs Actuelles": "valeursactuelles.com",