diff --git a/src/js/background.js b/src/js/background.js index ff5c28f..a8b5872 100755 --- a/src/js/background.js +++ b/src/js/background.js @@ -226,7 +226,7 @@ const blockedRegexes = { 'dailytelegraph.com.au': /cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js/, 'theglobeandmail.com': /(\.theglobeandmail\.com\/pf\/dist\/engine\/react\.js|smartwall\.theglobeandmail\.com\/)/, 'nytimes.com': /(\.nytimes\.com\/meter\.js|mwcm\.nyt\.com\/.+\.js|cooking\.nytimes\.com\/api\/.+\/access)/, - 'latimes.com': /(metering\.platform\.latimes\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/, + 'latimes.com': /\.californiatimes\.com\/meteringjs/, 'theathletic.com': /cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js/, 'japantimes.co.jp': /cdn\.cxense\.com\//, 'scmp.com': /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/, diff --git a/src/js/contentScript.js b/src/js/contentScript.js index 369f1c6..20d6bb7 100755 --- a/src/js/contentScript.js +++ b/src/js/contentScript.js @@ -641,16 +641,8 @@ if (matchDomain('elmercurio.com')) { body.removeAttribute('class'); } } else if (matchDomain('latimes.com')) { - const paywall = document.querySelector('metering-modal'); - const incognitoWall = document.querySelector('metering-toppanel'); - if (paywall) { - removeDOMElement(paywall); - } else if (incognitoWall) { - removeDOMElement(incognitoWall); - } - if (paywall || incognitoWall) { - document.body.removeAttribute('style'); - } + const ads = document.querySelectorAll('div.enhancement, div.google-dfp-ad-wrapper'); + hideDOMElement(...ads); } else if (matchDomain('foreignpolicy.com')) { const contentUngated = document.querySelector('div.content-ungated'); removeDOMElement(contentUngated);