diff --git a/background.js b/background.js index 6d69f82c..90be79ec 100644 --- a/background.js +++ b/background.js @@ -68,6 +68,7 @@ var allow_cookies = [ 'themarker.com', 'trouw.nl', 'volkskrant.nl', +'washingtonpost.com', 'worldpoliticsreview.com', ] @@ -81,7 +82,6 @@ const remove_cookies_select_hold = { 'barrons.com': ['wsjregion'], 'newstatesman.com': ['STYXKEY_nsversion'], 'qz.com': ['gdpr'], - 'washingtonpost.com': ['wp_gdpr'], 'wsj.com': ['wsjregion'] } @@ -126,6 +126,7 @@ var use_google_bot_default = [ 'theathletic.com', 'themarker.com', 'thetimes.co.uk', +'washingtonpost.com', 'worldpoliticsreview.com', 'wsj.com', ]; @@ -202,6 +203,7 @@ var blockedRegexes = { 'thedailybeast.com': /.+\.tinypass\.com\/.+/, 'thenation.com': /.+\.tinypass\.com\/.+/, 'valeursactuelles.com': /.+\.qiota\.com\/.+/, +'washingtonpost.com': /.+\.washingtonpost\.com\/dr\/resources\/dist\/washpost\/pwapi-proxy\.min\.js/, 'wsj.com': /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/ }; diff --git a/contentScript.js b/contentScript.js index bd2a8e96..53808b95 100644 --- a/contentScript.js +++ b/contentScript.js @@ -106,7 +106,8 @@ else if (matchDomain(['ad.nl', 'bd.nl', 'ed.nl', 'tubantia.nl', 'bndestem.nl', ' else if (matchDomain("washingtonpost.com")) { let leaderboard = document.querySelector('#leaderboard-wrapper'); - removeDOMElement(leaderboard); + let adverts = document.querySelectorAll('div[data-qa="article-body-ad"]'); + removeDOMElement(leaderboard, ...adverts); if (location.href.includes('/gdpr-consent/')) { let free_button = document.querySelector('.gdpr-consent-container .continue-btn.button.free'); if (free_button) @@ -257,8 +258,7 @@ else if (matchDomain("economist.com")) { const wrapper = document.getElementById('bottom-page-wrapper'); removeDOMElement(subscribe, wrapper); const adverts = document.querySelectorAll('.advert'); - for (let advert of adverts) - removeDOMElement(advert); + removeDOMElement(...adverts); window.setTimeout(function () { const paywall = document.querySelector('.layout-article-regwall'); ; if (paywall) { @@ -706,9 +706,7 @@ else if (matchDomain('historyextra.com')) { let article_masked = document.querySelector('.template-article__masked'); if (article_masked) { let extra_pars = document.querySelectorAll('div.template-article__masked > p'); - for (let extra_par of extra_pars) { - removeDOMElement(extra_par); - } + removeDOMElement(...extra_pars); article_masked.classList.remove('template-article__masked'); } let ad_banner = document.querySelector('.ad-banner-container');