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', 'themarker.com',
'trouw.nl', 'trouw.nl',
'volkskrant.nl', 'volkskrant.nl',
'washingtonpost.com',
'worldpoliticsreview.com', 'worldpoliticsreview.com',
] ]
@ -81,7 +82,6 @@ const remove_cookies_select_hold = {
'barrons.com': ['wsjregion'], 'barrons.com': ['wsjregion'],
'newstatesman.com': ['STYXKEY_nsversion'], 'newstatesman.com': ['STYXKEY_nsversion'],
'qz.com': ['gdpr'], 'qz.com': ['gdpr'],
'washingtonpost.com': ['wp_gdpr'],
'wsj.com': ['wsjregion'] 'wsj.com': ['wsjregion']
} }
@ -126,6 +126,7 @@ var use_google_bot_default = [
'theathletic.com', 'theathletic.com',
'themarker.com', 'themarker.com',
'thetimes.co.uk', 'thetimes.co.uk',
'washingtonpost.com',
'worldpoliticsreview.com', 'worldpoliticsreview.com',
'wsj.com', 'wsj.com',
]; ];
@ -202,6 +203,7 @@ var blockedRegexes = {
'thedailybeast.com': /.+\.tinypass\.com\/.+/, 'thedailybeast.com': /.+\.tinypass\.com\/.+/,
'thenation.com': /.+\.tinypass\.com\/.+/, 'thenation.com': /.+\.tinypass\.com\/.+/,
'valeursactuelles.com': /.+\.qiota\.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/ '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")) { else if (matchDomain("washingtonpost.com")) {
let leaderboard = document.querySelector('#leaderboard-wrapper'); 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/')) { if (location.href.includes('/gdpr-consent/')) {
let free_button = document.querySelector('.gdpr-consent-container .continue-btn.button.free'); let free_button = document.querySelector('.gdpr-consent-container .continue-btn.button.free');
if (free_button) if (free_button)
@ -257,8 +258,7 @@ else if (matchDomain("economist.com")) {
const wrapper = document.getElementById('bottom-page-wrapper'); const wrapper = document.getElementById('bottom-page-wrapper');
removeDOMElement(subscribe, wrapper); removeDOMElement(subscribe, wrapper);
const adverts = document.querySelectorAll('.advert'); const adverts = document.querySelectorAll('.advert');
for (let advert of adverts) removeDOMElement(...adverts);
removeDOMElement(advert);
window.setTimeout(function () { window.setTimeout(function () {
const paywall = document.querySelector('.layout-article-regwall'); ; const paywall = document.querySelector('.layout-article-regwall'); ;
if (paywall) { if (paywall) {
@ -706,9 +706,7 @@ else if (matchDomain('historyextra.com')) {
let article_masked = document.querySelector('.template-article__masked'); let article_masked = document.querySelector('.template-article__masked');
if (article_masked) { if (article_masked) {
let extra_pars = document.querySelectorAll('div.template-article__masked > p'); let extra_pars = document.querySelectorAll('div.template-article__masked > p');
for (let extra_par of extra_pars) { removeDOMElement(...extra_pars);
removeDOMElement(extra_par);
}
article_masked.classList.remove('template-article__masked'); article_masked.classList.remove('template-article__masked');
} }
let ad_banner = document.querySelector('.ad-banner-container'); let ad_banner = document.querySelector('.ad-banner-container');