mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-30 00:54:25 +02:00
Fix nytimes.com
This commit is contained in:
parent
97b84f0951
commit
badfe3685a
@ -67,7 +67,8 @@ const allowCookies = [
|
|||||||
'zeit.de',
|
'zeit.de',
|
||||||
'expansion.com',
|
'expansion.com',
|
||||||
'dailytelegraph.com.au',
|
'dailytelegraph.com.au',
|
||||||
'washingtonpost.com'
|
'washingtonpost.com',
|
||||||
|
'nytimes.com'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Removes cookies after page load
|
// Removes cookies after page load
|
||||||
@ -109,8 +110,7 @@ const removeCookies = [
|
|||||||
'wsj.com',
|
'wsj.com',
|
||||||
'medium.com',
|
'medium.com',
|
||||||
'washingtonpost.com',
|
'washingtonpost.com',
|
||||||
'japantimes.co.jp',
|
'japantimes.co.jp'
|
||||||
'nytimes.com'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// Contains remove cookie sites above plus any custom sites
|
// Contains remove cookie sites above plus any custom sites
|
||||||
@ -156,7 +156,8 @@ const useGoogleBotSites = [
|
|||||||
'df.cl',
|
'df.cl',
|
||||||
'ft.com',
|
'ft.com',
|
||||||
'wired.com',
|
'wired.com',
|
||||||
'zeit.de'
|
'zeit.de',
|
||||||
|
'nytimes.com'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Override User-Agent with Bingbot
|
// Override User-Agent with Bingbot
|
||||||
@ -526,6 +527,24 @@ extensionApi.webRequest.onCompleted.addListener(function (details) {
|
|||||||
urls: ['<all_urls>']
|
urls: ['<all_urls>']
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// nytimes.com fix
|
||||||
|
extensionApi.webRequest.onHeadersReceived.addListener(function (details) {
|
||||||
|
if (!isSiteEnabled(details)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let headers = details.responseHeaders;
|
||||||
|
headers = headers.map(function (header) {
|
||||||
|
if (header.name === 'x-frame-options') { header.value = 'SAMEORIGIN'; }
|
||||||
|
return header;
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
responseHeaders: headers
|
||||||
|
};
|
||||||
|
}, {
|
||||||
|
urls: ['*://*.nytimes.com/*']
|
||||||
|
},
|
||||||
|
['blocking', 'responseHeaders']);
|
||||||
|
|
||||||
// Google Analytics to anonymously track DAU (Chrome only)
|
// Google Analytics to anonymously track DAU (Chrome only)
|
||||||
function initGA () {
|
function initGA () {
|
||||||
(function (i, s, o, g, r, a, m) {
|
(function (i, s, o, g, r, a, m) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user