diff --git a/background.js b/background.js index 1cb6418..62ca300 100644 --- a/background.js +++ b/background.js @@ -203,6 +203,7 @@ var blockedRegexes = { 'sloanreview.mit.edu': /(.+\.tinypass\.com\/.+|.+\.netdna-ssl\.com\/wp-content\/themes\/smr\/assets\/js\/libs\/welcome-ad\.js)/, 'spectator.co.uk': /.+\.tinypass\.com\/.+/, 'spectator.com.au': /.+\.tinypass\.com\/.+/, +'technologyreview.com': /.+\.blueconic\.net\/.+/, 'telegraph.co.uk': /.+\.tinypass\.com\/.+/, 'thedailybeast.com': /.+\.tinypass\.com\/.+/, 'thenation.com': /.+\.tinypass\.com\/.+/, diff --git a/contentScript.js b/contentScript.js index 5e8fd2a..29f36dc 100644 --- a/contentScript.js +++ b/contentScript.js @@ -346,11 +346,14 @@ else if (matchDomain("thetimes.co.uk")) { } else if (matchDomain("technologyreview.com")) { - const read_story = document.querySelector('.storyExpanderButton'); - if (read_story) - read_story.click(); - const meter = document.querySelector('.meter'); - removeDOMElement(meter); + window.setTimeout(function () { + let body_obscured = document.querySelector('body[class*="body__obscureContent"]'); + if (body_obscured) + removeClassesByPrefix(body_obscured, 'body__obscureContent'); + let overlay = document.querySelector('div[class*="overlayFooter__wrapper"]'); + if (overlay) + overlay.setAttribute('style', 'display:none'); + }, 500); } else if (matchDomain("asia.nikkei.com")) { @@ -1022,6 +1025,11 @@ else if (matchDomain("mercuriovalpo.cl")) { body_modal.classList.remove('modal-open'); } +else if (matchDomain("discovermagazine.com")) { + let banner = document.querySelector('div.hWOjDZ, div.qa7yll-1'); + removeDOMElement(banner); +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) {