Fix National Review

This commit is contained in:
magnolia1234 2021-10-13 17:59:18 +02:00
parent 4794843adc
commit fed527675c
3 changed files with 12 additions and 13 deletions

View file

@ -231,6 +231,7 @@ var use_google_bot_default = [
'intelligentinvestor.com.au',
'lanouvellerepublique.fr',
'leparisien.fr',
'nationalreview.com',
'newleftreview.org',
'nknews.org',
'nouvelobs.com',
@ -364,7 +365,7 @@ var blockedRegexes = {
'nation.africa': /(\.evolok\.net\/|nation\.africa\/resource\/themes\/nation-.+\/js\/.+\.js)/,
'nationalgeographic.com': /\.blueconic\.net\//,
'nationalpost.com': /\.tinypass\.com\//,
'nationalreview.com': /(\.blueconic\.net\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js)/,
'nationalreview.com': /(\.blueconic\.net\/|\.nationalreview\.com\/script\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js)/,
'newrepublic.com': /\.onecount\.net\/js\//,
'newsday.com': /(loader-cdn\.azureedge\.net\/|js\.matheranalytics\.com\/)/,
'newsweek.com': /js\.pelcro\.com\//,

View file

@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Westfaelische Nachrichten (Germany)
Fix GElocal.it
Fix National Review
* v2.3.9.0 (2021-10-10)
Add Lee Enterprises Group (local USA)

View file

@ -2194,19 +2194,16 @@ else if (matchDomain('nationalgeographic.com')) {
}
else if (matchDomain('nationalreview.com')) {
document.addEventListener('DOMContentLoaded', () => {
let url = window.location.href;
let article_truncated = document.querySelector('div#article-content-truncate-wrap');
if (article_truncated && !url.includes('/amp/')) {
article_truncated.removeAttribute('id');
if (url.includes('?'))
window.location.href = url.replace('?', 'amp/?');
else
window.location.href = url + 'amp';
let url = window.location.href.split('?')[0];
if (!url.includes('/amp/')) {
let continue_reading = document.querySelector('div.continue-reading');
if (continue_reading) {
removeDOMElement(continue_reading);
window.location.href = url + 'amp';
}
let adverts = document.querySelectorAll('.ad-unit--center');
removeDOMElement(...adverts);
});
}
let adverts = document.querySelectorAll('amp-ad, .ad-unit--center');
removeDOMElement(...adverts);
}
else if (matchDomain('newleftreview.org')) {