mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-30 01:04:26 +02:00
Fix theatlantic.com
This commit is contained in:
parent
a93a4beb34
commit
7029ba34ef
@ -7,7 +7,8 @@ const restrictions = {
|
||||
'seekingalpha.com': /.+seekingalpha\.com\/article\/.+/,
|
||||
'techinasia.com': /\.techinasia\.com\/.+/,
|
||||
'ft.com': /.+\.ft.com\/content\//,
|
||||
'nytimes.com': /^((?!\/timesmachine\.nytimes\.com\/).)*$/
|
||||
'nytimes.com': /^((?!\/timesmachine\.nytimes\.com\/).)*$/,
|
||||
'theatlantic.com': /^((?!\/newsletters\.theatlantic\.com\/).)*$/
|
||||
};
|
||||
|
||||
// Don't remove cookies before page load
|
||||
@ -231,7 +232,8 @@ const blockedRegexes = {
|
||||
'japantimes.co.jp': /cdn\.cxense\.com\//,
|
||||
'scmp.com': /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/,
|
||||
'ilmessaggero.it': /(utils\.cedsdigital\.it\/js\/PaywallMeter\.js)/,
|
||||
'washingtonpost.com': /\.washingtonpost\.com\/tetro\/metering\/evaluate/
|
||||
'washingtonpost.com': /\.washingtonpost\.com\/tetro\/metering\/evaluate/,
|
||||
'theatlantic.com': /cdn\.theatlantic\.com\/_next\/static\/chunks\/pages\/.+\/archive\//
|
||||
};
|
||||
|
||||
const userAgentDesktop = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';
|
||||
|
@ -446,14 +446,10 @@ if (matchDomain('elmercurio.com')) {
|
||||
});
|
||||
}, 1000); // Delay (in milliseconds)
|
||||
} else if (matchDomain('theatlantic.com')) {
|
||||
// Remove all nudge elements
|
||||
document.querySelectorAll('div[class*="c-nudge"]').forEach(function (el) {
|
||||
removeDOMElement(el);
|
||||
});
|
||||
// Remove all FancyBox ads
|
||||
document.querySelectorAll('div[class*="fancybox"]').forEach(function (el) {
|
||||
removeDOMElement(el);
|
||||
});
|
||||
const images = document.querySelectorAll('img[class*="Image_lazy__"]');
|
||||
for (const elem of images) { removeClassesByPrefix(elem, 'Image_lazy__'); }
|
||||
const banners = document.querySelectorAll('.c-nudge__container, .c-non-metered-nudge, div[class^="ArticleInjector_"]');
|
||||
hideDOMElement(...banners);
|
||||
} else if (matchDomain('theathletic.com')) {
|
||||
if (!window.location.search.match(/(\?|&)amp/)) {
|
||||
const paywall = document.querySelector('div#slideup-paywall');
|
||||
|
Loading…
x
Reference in New Issue
Block a user