mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-29 19:54:28 +02:00
Fix NY Times Cooking
This commit is contained in:
parent
5adc770a05
commit
e15bc95ae4
@ -242,7 +242,8 @@ const blockedRegexes = {
|
||||
'expansion.com': /cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js/,
|
||||
'chicagobusiness.com': /(\.tinypass\.com\/|\.chicagobusiness\.com\/.+\/js\/js_.+\.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)/
|
||||
};
|
||||
|
||||
const userAgentDesktop = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';
|
||||
|
@ -261,17 +261,8 @@ if (matchDomain('elmercurio.com')) {
|
||||
removeDOMElement(counter, coBanner, support);
|
||||
});
|
||||
} else if (matchDomain('nytimes.com')) {
|
||||
const previewButton = document.querySelector('.css-3s1ce0');
|
||||
if (previewButton) { previewButton.click(); }
|
||||
blockElement('.css-3fbowa'); // Prevent bottom dock from appearing
|
||||
blockElement('#gateway-content'); // Remove paywall
|
||||
blockElement('.css-1bd8bfl'); // Remove filter
|
||||
// Restore scrolling
|
||||
document.onreadystatechange = function () {
|
||||
if (document.readyState === 'complete') {
|
||||
document.querySelector('.css-mcm29f').setAttribute('style', 'position:relative');
|
||||
}
|
||||
};
|
||||
const banners = document.querySelectorAll('div[data-testid="inline-message"], div[id^="ad-"], div.expanded-dock');
|
||||
removeDOMElement(...banners);
|
||||
} else if (matchDomain('technologyreview.com')) {
|
||||
window.setTimeout(function () {
|
||||
const bodyObscured = document.querySelector('body[class*="body__obscureContent"]');
|
||||
|
Loading…
x
Reference in New Issue
Block a user