Fix-update WaPo (Googlebot & block Javascript)

This commit is contained in:
magnolia1234 2020-08-22 20:25:53 +02:00
parent fde41a7c80
commit 9288e5731d
2 changed files with 7 additions and 7 deletions

View file

@ -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/
};

View file

@ -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');