From 7ddfaf108762d474da424ad89cef7a2adfc61ff6 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 5 Jan 2020 17:50:56 +0100 Subject: [PATCH] Fix for MIT Tech Review Click the button to expand article and remove banner --- contentScript.js | 8 ++++++++ manifest.json | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/contentScript.js b/contentScript.js index 6885021..f521a5f 100644 --- a/contentScript.js +++ b/contentScript.js @@ -291,6 +291,14 @@ if (window.location.href.indexOf("scribd.com") !== -1) { removeDOMElement(portal, page_module, promo, ad); } +if (window.location.href.indexOf("technologyreview.com") !== -1) { + const read_story = document.querySelector('.storyExpanderButton'); + if (read_story) + read_story.click(); + const meter = document.querySelector('.meter'); + removeDOMElement(meter); +} + function removeDOMElement(...elements) { for (let element of elements) { if (element) element.remove(); diff --git a/manifest.json b/manifest.json index e9b2b5e..41a3c57 100644 --- a/manifest.json +++ b/manifest.json @@ -31,7 +31,8 @@ "*://*.thestar.com/*", "*://*.afr.com/*", "*://*.theglobeandmail.com/*", - "*://*.scribd.com/*" + "*://*.scribd.com/*", + "*://*.technologyreview.com/*" ], "js": ["contentScript.js"] }