mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-05-23 20:12:08 +02:00
Fix japantimes.co.jp
This commit is contained in:
parent
de3051da61
commit
780c7854a0
@ -123,7 +123,8 @@ const removeCookies = [
|
|||||||
'vulture.com',
|
'vulture.com',
|
||||||
'wsj.com',
|
'wsj.com',
|
||||||
'medium.com',
|
'medium.com',
|
||||||
'washingtonpost.com'
|
'washingtonpost.com',
|
||||||
|
'japantimes.co.jp'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Contains remove cookie sites above plus any custom sites
|
// Contains remove cookie sites above plus any custom sites
|
||||||
@ -245,7 +246,8 @@ const blockedRegexes = {
|
|||||||
'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/
|
'theathletic.com': /cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js/,
|
||||||
|
'japantimes.co.jp': /cdn\.cxense\.com\//
|
||||||
};
|
};
|
||||||
|
|
||||||
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)';
|
||||||
@ -322,7 +324,8 @@ extensionApi.webRequest.onBeforeRequest.addListener(function (details) {
|
|||||||
|
|
||||||
// Disable javascript for these sites
|
// Disable javascript for these sites
|
||||||
extensionApi.webRequest.onBeforeRequest.addListener(function (details) {
|
extensionApi.webRequest.onBeforeRequest.addListener(function (details) {
|
||||||
if (!isSiteEnabled(details) && !enabledSites.includes('generalpaywallbypass')) {
|
const headerReferer = details.originUrl ? details.originUrl : details.initiator;
|
||||||
|
if (!isSiteEnabled(details) && (!enabledSites.includes('generalpaywallbypass') || matchUrlDomain('japantimes.co.jp', headerReferer))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return { cancel: true };
|
return { cancel: true };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user