From b3713b52ecfc0c58c9b855372dcb069202ca86ac Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Thu, 5 Dec 2019 21:32:20 +0100 Subject: [PATCH] Add Times Literary Supplement --- README.md | 1 + background.js | 1 + contentScript.js | 5 +++++ manifest.json | 8 +++++--- options.js | 1 + 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0a2ce70..f271012 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ [The Toronto Star](https://www.thestar.com)\ [The Washington Post](https://www.washingtonpost.com)\ [The Wall Street Journal](https://www.wsj.com)\ +[Times Literary Supplement](https://www.the-tls.co.uk)\ [Towards Data Science](https://www.towardsdatascience.com)\ [Trouw](https://www.trouw.nl)\ [Vanity Fair](https://www.vanityfair.com)\ diff --git a/background.js b/background.js index 06ce2c3..312e00f 100644 --- a/background.js +++ b/background.js @@ -86,6 +86,7 @@ var defaultSites = { 'The Toronto Star': 'thestar.com', 'The Washington Post': 'washingtonpost.com', 'The Wall Street Journal': 'wsj.com', + 'Times Literary Supplement': 'the-tls.co.uk', 'Towards Data Science': 'towardsdatascience.com', 'Trouw': 'trouw.nl', 'Vanity Fair': 'vanityfair.com', diff --git a/contentScript.js b/contentScript.js index 7bae698..6e8fc09 100644 --- a/contentScript.js +++ b/contentScript.js @@ -176,6 +176,11 @@ if (window.location.href.indexOf("economist.com") !== -1) { removeDOMElement(wrapper); } +if (window.location.href.indexOf("the-tls.co.uk") !== -1) { + const paywall = document.querySelector('.tls-subscriptions-banner__closed-skin'); + removeDOMElement(paywall); +} + function removeDOMElement(...elements) { for (let element of elements) { if (element) element.remove(); diff --git a/manifest.json b/manifest.json index 4a7caa1..c41cd6b 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,8 @@ "*://*.trouw.nl/*", "*://*.volkskrant.nl/*", "*://*.washingtonpost.com/*", - "*://*.economist.com/*" + "*://*.economist.com/*", + "*://*.the-tls.co.uk/*" ], "js": ["contentScript.js"] } @@ -147,8 +148,9 @@ "*://*.scientificamerican.com/*", "*://*.thehindu.com/*", "*://*.demorgen.be/*", - "*://*.tinypass.com/*", - "*://*.lrb.co.uk/*" + "*://*.tinypass.com/*", + "*://*.lrb.co.uk/*", + "*://*.the-tls.co.uk/*" ], "version": "1.6.2" } diff --git a/options.js b/options.js index cb4ce54..9b980b4 100644 --- a/options.js +++ b/options.js @@ -84,6 +84,7 @@ var defaultSites = { 'The Toronto Star (javascript disabled)': 'thestar.com', 'The Washington Post': 'washingtonpost.com', 'The Wall Street Journal': 'wsj.com', + 'Times Literary Supplement': 'the-tls.co.uk', 'Towards Data Science': 'towardsdatascience.com', 'Trouw': 'trouw.nl', 'Vanity Fair': 'vanityfair.com',