mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-05-24 17:02:07 +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/,
|
'expansion.com': /cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js/,
|
||||||
'chicagobusiness.com': /(\.tinypass\.com\/|\.chicagobusiness\.com\/.+\/js\/js_.+\.js)/,
|
'chicagobusiness.com': /(\.tinypass\.com\/|\.chicagobusiness\.com\/.+\/js\/js_.+\.js)/,
|
||||||
'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)/
|
||||||
};
|
};
|
||||||
|
|
||||||
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)';
|
||||||
|
@ -261,17 +261,8 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
removeDOMElement(counter, coBanner, support);
|
removeDOMElement(counter, coBanner, support);
|
||||||
});
|
});
|
||||||
} else if (matchDomain('nytimes.com')) {
|
} else if (matchDomain('nytimes.com')) {
|
||||||
const previewButton = document.querySelector('.css-3s1ce0');
|
const banners = document.querySelectorAll('div[data-testid="inline-message"], div[id^="ad-"], div.expanded-dock');
|
||||||
if (previewButton) { previewButton.click(); }
|
removeDOMElement(...banners);
|
||||||
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');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
} else if (matchDomain('technologyreview.com')) {
|
} else if (matchDomain('technologyreview.com')) {
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
const bodyObscured = document.querySelector('body[class*="body__obscureContent"]');
|
const bodyObscured = document.querySelector('body[class*="body__obscureContent"]');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user