mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-30 01:34:26 +02:00
Fix theathletic.com
This commit is contained in:
parent
17ef75f259
commit
02063e0032
@ -244,7 +244,8 @@ const blockedRegexes = {
|
|||||||
'dailytelegraph.com.au': /cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js/,
|
'dailytelegraph.com.au': /cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js/,
|
||||||
'theglobeandmail.com': /(\.theglobeandmail\.com\/pf\/dist\/engine\/react\.js|smartwall\.theglobeandmail\.com\/)/,
|
'theglobeandmail.com': /(\.theglobeandmail\.com\/pf\/dist\/engine\/react\.js|smartwall\.theglobeandmail\.com\/)/,
|
||||||
'nytimes.com': /(meter-svc\.nytimes\.com\/meter\.js|mwcm\.nyt\.com\/.+\.js|cooking\.nytimes\.com\/api\/.+\/access)/,
|
'nytimes.com': /(meter-svc\.nytimes\.com\/meter\.js|mwcm\.nyt\.com\/.+\.js|cooking\.nytimes\.com\/api\/.+\/access)/,
|
||||||
'latimes.com': /(metering\.platform\.latimes\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/
|
'latimes.com': /(metering\.platform\.latimes\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/,
|
||||||
|
'theathletic.com': /cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js/
|
||||||
};
|
};
|
||||||
|
|
||||||
const userAgentDesktop = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';
|
const userAgentDesktop = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';
|
||||||
|
@ -461,21 +461,32 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
document.querySelectorAll('div[class*="fancybox"]').forEach(function (el) {
|
document.querySelectorAll('div[class*="fancybox"]').forEach(function (el) {
|
||||||
removeDOMElement(el);
|
removeDOMElement(el);
|
||||||
});
|
});
|
||||||
} else if (matchDomain(['theathletic.com', 'theathletic.co.uk'])) {
|
} else if (matchDomain('theathletic.com')) {
|
||||||
if (!window.location.href.includes('?amp')) {
|
if (!window.location.search.match(/(\?|&)amp/)) {
|
||||||
const paywall = document.querySelectorAll('div#paywall-container, div[subscriptions-action="subscribe"], a.headline-paywall');
|
const paywall = document.querySelector('div#slideup-paywall');
|
||||||
const amphtml = document.querySelector('link[rel="amphtml"]');
|
if (paywall) {
|
||||||
if (paywall.length && amphtml) {
|
const overlays = document.querySelectorAll('div[id*="overlay"], div:empty:not([data-rjs])');
|
||||||
removeDOMElement(...paywall);
|
removeDOMElement(paywall, ...overlays);
|
||||||
window.setTimeout(function () {
|
const body = document.querySelector('body');
|
||||||
window.location.href = amphtml.href;
|
if (body) {
|
||||||
}, 500);
|
body.style.overflow = 'visible';
|
||||||
|
body.style.position = 'relative';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const headlinePaywall = document.querySelectorAll('a.headline-paywall');
|
||||||
|
const amphtml = document.querySelector('link[rel="amphtml"]');
|
||||||
|
if (headlinePaywall.length && amphtml) {
|
||||||
|
removeDOMElement(...headlinePaywall);
|
||||||
|
window.setTimeout(function () {
|
||||||
|
window.location.href = amphtml.href;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ampUnhideSubscriptionsSection();
|
ampUnhideSubscriptionsSection();
|
||||||
const subscriptionsActions = document.querySelectorAll('[subscriptions-actions]');
|
|
||||||
removeDOMElement(...subscriptionsActions);
|
|
||||||
}
|
}
|
||||||
|
const apron = document.querySelector('div#free-apron-cta, div.slideup-free-apron-container');
|
||||||
|
removeDOMElement(apron);
|
||||||
} else if (matchDomain('newyorker.com')) {
|
} else if (matchDomain('newyorker.com')) {
|
||||||
blockElement('.paywall-bar', true);
|
blockElement('.paywall-bar', true);
|
||||||
blockElement('.paywall-modal');
|
blockElement('.paywall-modal');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user