diff --git a/README.md b/README.md index 39f1984..46d9029 100755 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ [Bloomberg Quint](https://www.bloombergquint.com)\ [Bloomberg](https://www.bloomberg.com)\ [BN De Stem](https://www.bndestem.nl)\ +[Boston Globe](https://www.bostonglobe.com)\ [Brabants Dagblad](https://www.bd.nl)\ [Brisbane Times](https://www.brisbanetimes.com.au)\ [Business Insider](https://www.businessinsider.com)\ diff --git a/manifest-ff.json b/manifest-ff.json index a05f7ab..224ff73 100755 --- a/manifest-ff.json +++ b/manifest-ff.json @@ -72,7 +72,8 @@ "*://*.elmundo.es/*", "*://*.time.com/*", "*://*.expansion.com/*", - "*://*.foreignpolicy.com/*" + "*://*.foreignpolicy.com/*", + "*://*.bostonglobe.com/*" ], "js": ["src/js/contentScript.js"] } diff --git a/src/js/contentScript.js b/src/js/contentScript.js index f3701f2..f54bf3c 100755 --- a/src/js/contentScript.js +++ b/src/js/contentScript.js @@ -661,6 +661,25 @@ if (matchDomain('elmercurio.com')) { if (contentGated) { contentGated.classList.remove('content-gated'); } +} else if (matchDomain('bostonglobe.com')) { + // Remove the portion covering the paywall + const paywall = document.querySelector('div.meter-paywall') + if (paywall) { + removeDOMElement(paywall) + } + // Re-enable scrolling + const body = document.querySelector('body') + if (body) { + document.body.removeAttribute('style') + } + // Click the button to reveal the rest of the article + const buttonDiv = document.querySelector('[id="continue_button"]') + if (buttonDiv) { + const button = buttonDiv.querySelector('button') + if (button) { + button.click() + } + } } function matchDomain (domains) { diff --git a/src/js/sites.js b/src/js/sites.js index 526f406..c871e39 100755 --- a/src/js/sites.js +++ b/src/js/sites.js @@ -9,6 +9,7 @@ const defaultSites = { 'Bloomberg': 'bloomberg.com', 'Bloomberg Quint (free articles only)': 'bloombergquint.com', 'BN De Stem': 'bndestem.nl', + 'Boston Globe': 'bostonglobe.com', 'Brabants Dagblad': 'bd.nl', 'Brisbane Times': 'brisbanetimes.com.au', 'Business Insider': 'businessinsider.com',