diff --git a/README.md b/README.md index 9da539c..320ed96 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ [Parool](https://www.parool.nl)\ [Quartz](https://qz.com)\ [Quora](https://www.quora.com)\ +[Scientific American](https://scientificamerican.com)\ [Statista](https://www.statista.com)\ [SunSentinel](https://www.sun-sentinel.com)\ [Telegraaf](https://telegraaf.nl)\ @@ -67,6 +68,7 @@ [The Diplomat](https://www.thediplomat.com)\ [The Globe and Mail](https://www.theglobeandmail.com)\ [The Herald](https://www.theherald.com.au)\ +[The Hindu](https://www.thehindu.com)\ [The Japan Times](https://www.japantimes.co.jp)\ [TheMarker](https://www.themarker.com)\ [The Mercury News](https://www.mercurynews.com)\ diff --git a/background.js b/background.js index dda389a..c747260 100644 --- a/background.js +++ b/background.js @@ -32,7 +32,7 @@ var defaultSites = { 'Inc.com': 'inc.com', 'Investors Chronicle': 'investorschronicle.co.uk', 'La Repubblica': 'repubblica.it', - 'Le Monde': 'lemonde.fr', + 'Le Monde': 'lemonde.fr', 'Le Temps': 'letemps.ch', 'Los Angeles Times': 'latimes.com', 'Medium': 'medium.com', @@ -51,9 +51,10 @@ var defaultSites = { 'Parool': 'parool.nl', 'Quartz': 'qz.com', 'Quora': 'quora.com', + 'Scientific American': 'scientificamerican.com', 'Statista': 'statista.com', - 'Telegraaf': 'telegraaf.nl', 'SunSentinel': 'sun-sentinel.com', + 'Telegraaf': 'telegraaf.nl', 'The Advocate': 'theadvocate.com.au', 'The Age': 'theage.com.au', 'The Atlantic': 'theatlantic.com', @@ -64,6 +65,7 @@ var defaultSites = { 'The Diplomat': 'thediplomat.com', 'The Globe and Mail': 'theglobeandmail.com', 'The Herald': 'theherald.com.au', + 'The Hindu': 'thehindu.com', 'The Japan Times': 'japantimes.co.jp', 'TheMarker': 'themarker.com', 'The Mercury News': 'mercurynews.com', @@ -116,6 +118,7 @@ const allow_cookies = [ 'ocregister.com', 'parool.nl', 'qz.com', +'scientificamerican.com', 'spectator.co.uk', 'telegraaf.nl', 'theadvocate.com.au', @@ -153,6 +156,7 @@ const remove_cookies = [ 'nytimes.com', 'ocregister.com', 'qz.com', +'scientificamerican.com', 'spectator.co.uk', 'telegraaf.nl', 'theadvocate.com.au', @@ -181,6 +185,7 @@ const remove_cookies_select_drop = { // Override User-Agent with Googlebot const use_google_bot = [ 'barrons.com', +'lemonde.fr', 'nytimes.com', 'quora.com', 'telegraph.co.uk', diff --git a/contentScript.js b/contentScript.js index 1e01a06..a645999 100644 --- a/contentScript.js +++ b/contentScript.js @@ -106,8 +106,10 @@ if (window.location.href.indexOf("bloombergquint.com") !== -1) { } if (window.location.href.indexOf("bloomberg.com") !== -1) { - const paywall = document.getElementById('paywall-banner'); - removeDOMElement(paywall); + document.addEventListener('DOMContentLoaded', () => { + const paywall = document.getElementById('paywall-banner'); + removeDOMElement(paywall); + }); } if (window.location.href.indexOf('telegraaf.nl') !== -1) { diff --git a/manifest.json b/manifest.json index 052c628..c3b085a 100644 --- a/manifest.json +++ b/manifest.json @@ -138,7 +138,9 @@ "*://*.telegraaf.nl/*", "*://*.trouw.nl/*", "*://*.vn.nl/*", - "*://*.lemonde.fr/*" + "*://*.lemonde.fr/*", + "*://*.scientificamerican.com/*", + "*://*.thehindu.com/*" ], "version": "1.6.0" } diff --git a/options.js b/options.js index 463de34..fbb3d3d 100644 --- a/options.js +++ b/options.js @@ -49,6 +49,7 @@ var defaultSites = { 'Parool': 'parool.nl', 'Quartz': 'qz.com', 'Quora': 'quora.com', + 'Scientific American': 'scientificamerican.com', 'Statista': 'statista.com', 'SunSentinel': 'sun-sentinel.com', 'Telegraaf': 'telegraaf.nl', @@ -62,6 +63,7 @@ var defaultSites = { 'The Diplomat': 'thediplomat.com', 'The Globe and Mail (javascript disabled)': 'theglobeandmail.com', 'The Herald': 'theherald.com.au', + 'The Hindu': 'thehindu.com', 'The Japan Times': 'japantimes.co.jp', 'TheMarker': 'themarker.com', 'The Mercury News': 'mercurynews.com', @@ -131,7 +133,7 @@ function renderOptions() { inputEl.type = 'checkbox'; inputEl.dataset.key = key; inputEl.dataset.value = value; - inputEl.checked = key in sites; + inputEl.checked = (key in sites) || (key.replace(/\s\(.*\)/, '') in sites); labelEl.appendChild(inputEl); labelEl.appendChild(document.createTextNode(' '+key));