mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-05-01 08:44:25 +02:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c66fb6d18a | ||
![]() |
7029ba34ef | ||
![]() |
a93a4beb34 | ||
![]() |
badfe3685a | ||
![]() |
97b84f0951 | ||
![]() |
747dddda71 | ||
![]() |
38027f3840 | ||
![]() |
416bf48643 | ||
![]() |
3c737d3f4b | ||
![]() |
5bb7dc1665 | ||
![]() |
29b2089437 | ||
![]() |
fbe4106b0c | ||
![]() |
997f83c778 | ||
![]() |
d7a511000b | ||
![]() |
5726649002 |
@ -26,16 +26,13 @@
|
|||||||
### Bypass the following sites' paywalls with this extension:
|
### Bypass the following sites' paywalls with this extension:
|
||||||
|
|
||||||
[Adweek](https://www.adweek.com)\
|
[Adweek](https://www.adweek.com)\
|
||||||
[Algemeen Dagblad](https://www.ad.nl)\
|
|
||||||
[American Banker](https://www.americanbanker.com)\
|
[American Banker](https://www.americanbanker.com)\
|
||||||
[Ámbito](https://www.ambito.com)\
|
[Ámbito](https://www.ambito.com)\
|
||||||
[Baltimore Sun](https://www.baltimoresun.com)\
|
[Baltimore Sun](https://www.baltimoresun.com)\
|
||||||
[Barron's](https://www.barrons.com)\
|
[Barron's](https://www.barrons.com)\
|
||||||
[Bloomberg Quint](https://www.bloombergquint.com)\
|
[Bloomberg Quint](https://www.bloombergquint.com)\
|
||||||
[Bloomberg](https://www.bloomberg.com)\
|
[Bloomberg](https://www.bloomberg.com)\
|
||||||
[BN De Stem](https://www.bndestem.nl)\
|
|
||||||
[Boston Globe](https://www.bostonglobe.com)\
|
[Boston Globe](https://www.bostonglobe.com)\
|
||||||
[Brabants Dagblad](https://www.bd.nl)\
|
|
||||||
[Brisbane Times](https://www.brisbanetimes.com.au)\
|
[Brisbane Times](https://www.brisbanetimes.com.au)\
|
||||||
[Business Insider](https://www.businessinsider.com)\
|
[Business Insider](https://www.businessinsider.com)\
|
||||||
[Caixin](https://www.caixinglobal.com)\
|
[Caixin](https://www.caixinglobal.com)\
|
||||||
@ -45,9 +42,7 @@
|
|||||||
[Corriere Della Sera](https://www.corriere.it)\
|
[Corriere Della Sera](https://www.corriere.it)\
|
||||||
[Crain's Chicago Business](https://www.chicagobusiness.com)\
|
[Crain's Chicago Business](https://www.chicagobusiness.com)\
|
||||||
[Daily Press](https://www.dailypress.com)\
|
[Daily Press](https://www.dailypress.com)\
|
||||||
[De Gelderlander](https://www.gelderlander.nl)\
|
|
||||||
[De Groene Amsterdammer](https://www.groene.nl)\
|
[De Groene Amsterdammer](https://www.groene.nl)\
|
||||||
[De Stentor](https://www.destentor.nl)\
|
|
||||||
[De Speld](https://speld.nl)\
|
[De Speld](https://speld.nl)\
|
||||||
[De Tijd](https://www.tijd.be)\
|
[De Tijd](https://www.tijd.be)\
|
||||||
[De Volkskrant](https://www.volkskrant.nl)\
|
[De Volkskrant](https://www.volkskrant.nl)\
|
||||||
@ -56,7 +51,6 @@
|
|||||||
[Diario Financiero](https://www.df.cl)\
|
[Diario Financiero](https://www.df.cl)\
|
||||||
[Domani](https://www.editorialedomani.it)\
|
[Domani](https://www.editorialedomani.it)\
|
||||||
[Dynamed Plus](https://www.dynamed.com)\
|
[Dynamed Plus](https://www.dynamed.com)\
|
||||||
[Eindhovens Dagblad](https://www.ed.nl)\
|
|
||||||
[El Mercurio](https://www.elmercurio.com)\
|
[El Mercurio](https://www.elmercurio.com)\
|
||||||
[El Pais](https://www.elpais.com)\
|
[El Pais](https://www.elpais.com)\
|
||||||
[El Periodico](https://www.elperiodico.com)\
|
[El Periodico](https://www.elperiodico.com)\
|
||||||
@ -119,7 +113,6 @@
|
|||||||
[New Zealand Herald](https://www.nzherald.co.nz)\
|
[New Zealand Herald](https://www.nzherald.co.nz)\
|
||||||
[Orange County Register](https://www.ocregister.com)\
|
[Orange County Register](https://www.ocregister.com)\
|
||||||
[Orlando Sentinel](https://www.orlandosentinel.com)\
|
[Orlando Sentinel](https://www.orlandosentinel.com)\
|
||||||
[PZC](https://www.pzc.nl)\
|
|
||||||
[Palo Alto Online](https://www.paloaltoonline.com)\
|
[Palo Alto Online](https://www.paloaltoonline.com)\
|
||||||
[Parool](https://www.parool.nl)\
|
[Parool](https://www.parool.nl)\
|
||||||
[Postimees](https://www.postimees.ee)\
|
[Postimees](https://www.postimees.ee)\
|
||||||
@ -188,7 +181,6 @@
|
|||||||
[Times Literary Supplement](https://www.the-tls.co.uk)\
|
[Times Literary Supplement](https://www.the-tls.co.uk)\
|
||||||
[Towards Data Science](https://www.towardsdatascience.com)\
|
[Towards Data Science](https://www.towardsdatascience.com)\
|
||||||
[Trouw](https://www.trouw.nl)\
|
[Trouw](https://www.trouw.nl)\
|
||||||
[Tubantia](https://www.tubantia.nl)\
|
|
||||||
[Vanity Fair](https://www.vanityfair.com)\
|
[Vanity Fair](https://www.vanityfair.com)\
|
||||||
[Vrij Nederland](https://www.vn.nl)\
|
[Vrij Nederland](https://www.vn.nl)\
|
||||||
[Vulture](https://www.vulture.com)\
|
[Vulture](https://www.vulture.com)\
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": [
|
"matches": [
|
||||||
"*://*.ad.nl/*",
|
|
||||||
"*://*.afr.com/*",
|
"*://*.afr.com/*",
|
||||||
"*://*.americanbanker.com/*",
|
"*://*.americanbanker.com/*",
|
||||||
"*://*.ambito.com/*",
|
"*://*.ambito.com/*",
|
||||||
@ -20,7 +19,6 @@
|
|||||||
"*://*.caixinglobal.com/*",
|
"*://*.caixinglobal.com/*",
|
||||||
"*://*.canberratimes.com.au/*",
|
"*://*.canberratimes.com.au/*",
|
||||||
"*://*.economist.com/*",
|
"*://*.economist.com/*",
|
||||||
"*://*.ed.nl/*",
|
|
||||||
"*://*.editorialedomani.it/*",
|
"*://*.editorialedomani.it/*",
|
||||||
"*://*.elmercurio.com/*",
|
"*://*.elmercurio.com/*",
|
||||||
"*://*.elpais.com/*",
|
"*://*.elpais.com/*",
|
||||||
@ -125,7 +123,6 @@
|
|||||||
"*://*.poool.fr/*",
|
"*://*.poool.fr/*",
|
||||||
"*://*.qiota.com/*",
|
"*://*.qiota.com/*",
|
||||||
"*://*.tinypass.com/*",
|
"*://*.tinypass.com/*",
|
||||||
"*://*.ad.nl/*",
|
|
||||||
"*://*.adelaidenow.com.au/*",
|
"*://*.adelaidenow.com.au/*",
|
||||||
"*://*.adweek.com/*",
|
"*://*.adweek.com/*",
|
||||||
"*://*.afr.com/*",
|
"*://*.afr.com/*",
|
||||||
@ -153,7 +150,6 @@
|
|||||||
"*://*.denverpost.com/*",
|
"*://*.denverpost.com/*",
|
||||||
"*://*.dynamed.com/*",
|
"*://*.dynamed.com/*",
|
||||||
"*://*.economist.com/*",
|
"*://*.economist.com/*",
|
||||||
"*://*.ed.nl/*",
|
|
||||||
"*://*.elmercurio.com/*",
|
"*://*.elmercurio.com/*",
|
||||||
"*://*.elu24.ee/*",
|
"*://*.elu24.ee/*",
|
||||||
"*://*.examiner.com.au/*",
|
"*://*.examiner.com.au/*",
|
||||||
@ -266,12 +262,6 @@
|
|||||||
"*://*.startribune.com/*",
|
"*://*.startribune.com/*",
|
||||||
"*://*.df.cl/*",
|
"*://*.df.cl/*",
|
||||||
"*://*.financialpost.com/*",
|
"*://*.financialpost.com/*",
|
||||||
"*://*.gelderlander.nl/*",
|
|
||||||
"*://*.bndestem.nl/*",
|
|
||||||
"*://*.bd.nl/*",
|
|
||||||
"*://*.tubantia.nl/*",
|
|
||||||
"*://*.pzc.nl/*",
|
|
||||||
"*://*.destentor.nl/*",
|
|
||||||
"*://*.ambito/*",
|
"*://*.ambito/*",
|
||||||
"*://*.sueddeutsche.de/*",
|
"*://*.sueddeutsche.de/*",
|
||||||
"*://*.spectator.us/*",
|
"*://*.spectator.us/*",
|
||||||
|
@ -6,24 +6,21 @@ const restrictions = {
|
|||||||
'economist.com': /.+economist\.com\/.+\/\d{1,4}\/\d{1,2}\/\d{2}\/.+/,
|
'economist.com': /.+economist\.com\/.+\/\d{1,4}\/\d{1,2}\/\d{2}\/.+/,
|
||||||
'seekingalpha.com': /.+seekingalpha\.com\/article\/.+/,
|
'seekingalpha.com': /.+seekingalpha\.com\/article\/.+/,
|
||||||
'techinasia.com': /\.techinasia\.com\/.+/,
|
'techinasia.com': /\.techinasia\.com\/.+/,
|
||||||
'ft.com': /.+\.ft.com\/content\//
|
'ft.com': /.+\.ft.com\/content\//,
|
||||||
|
'nytimes.com': /^((?!\/timesmachine\.nytimes\.com\/).)*$/,
|
||||||
|
'theatlantic.com': /^((?!\/newsletters\.theatlantic\.com\/).)*$/,
|
||||||
|
'bloomberg.com': /^((?!\.bloomberg\.com\/news\/terminal\/).)*$/
|
||||||
};
|
};
|
||||||
|
|
||||||
// Don't remove cookies before page load
|
// Don't remove cookies before page load
|
||||||
const allowCookies = [
|
const allowCookies = [
|
||||||
'ad.nl',
|
|
||||||
'bd.nl',
|
|
||||||
'bndestem.nl',
|
|
||||||
'brisbanetimes.com.au',
|
'brisbanetimes.com.au',
|
||||||
'canberratimes.com.au',
|
'canberratimes.com.au',
|
||||||
'cen.acs.org',
|
'cen.acs.org',
|
||||||
'demorgen.be',
|
'demorgen.be',
|
||||||
'denverpost.com',
|
'denverpost.com',
|
||||||
'destentor.nl',
|
|
||||||
'ed.nl',
|
|
||||||
'examiner.com.au',
|
'examiner.com.au',
|
||||||
'gelocal.it',
|
'gelocal.it',
|
||||||
'gelderlander.nl',
|
|
||||||
'grubstreet.com',
|
'grubstreet.com',
|
||||||
'harpers.org',
|
'harpers.org',
|
||||||
'hbr.org',
|
'hbr.org',
|
||||||
@ -37,7 +34,6 @@ const allowCookies = [
|
|||||||
'nymag.com',
|
'nymag.com',
|
||||||
'ocregister.com',
|
'ocregister.com',
|
||||||
'parool.nl',
|
'parool.nl',
|
||||||
'pzc.nl',
|
|
||||||
'qz.com',
|
'qz.com',
|
||||||
'scientificamerican.com',
|
'scientificamerican.com',
|
||||||
'seattletimes.com',
|
'seattletimes.com',
|
||||||
@ -45,7 +41,6 @@ const allowCookies = [
|
|||||||
'sofrep.com',
|
'sofrep.com',
|
||||||
'spectator.co.uk',
|
'spectator.co.uk',
|
||||||
'speld.nl',
|
'speld.nl',
|
||||||
'tubantia.nl',
|
|
||||||
'techinasia.com',
|
'techinasia.com',
|
||||||
'telegraaf.nl',
|
'telegraaf.nl',
|
||||||
'the-american-interest.com',
|
'the-american-interest.com',
|
||||||
@ -74,25 +69,20 @@ 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
|
||||||
const removeCookies = [
|
const removeCookies = [
|
||||||
'ad.nl',
|
|
||||||
'bd.nl',
|
|
||||||
'bloomberg.com',
|
'bloomberg.com',
|
||||||
'bloombergquint.com',
|
'bloombergquint.com',
|
||||||
'bndestem.nl',
|
|
||||||
'brisbanetimes.com.au',
|
'brisbanetimes.com.au',
|
||||||
'canberratimes.com.au',
|
'canberratimes.com.au',
|
||||||
'cen.acs.org',
|
'cen.acs.org',
|
||||||
'demorgen.be',
|
'demorgen.be',
|
||||||
'denverpost.com',
|
'denverpost.com',
|
||||||
'destentor.nl',
|
|
||||||
'ed.nl',
|
|
||||||
'examiner.com.au',
|
'examiner.com.au',
|
||||||
'gelderlander.nl',
|
|
||||||
'globes.co.il',
|
'globes.co.il',
|
||||||
'grubstreet.com',
|
'grubstreet.com',
|
||||||
'harpers.org',
|
'harpers.org',
|
||||||
@ -104,7 +94,6 @@ const removeCookies = [
|
|||||||
'nrc.nl',
|
'nrc.nl',
|
||||||
'nymag.com',
|
'nymag.com',
|
||||||
'ocregister.com',
|
'ocregister.com',
|
||||||
'pzc.nl',
|
|
||||||
'qz.com',
|
'qz.com',
|
||||||
'scientificamerican.com',
|
'scientificamerican.com',
|
||||||
'seattletimes.com',
|
'seattletimes.com',
|
||||||
@ -118,7 +107,6 @@ const removeCookies = [
|
|||||||
'thecut.com',
|
'thecut.com',
|
||||||
'thediplomat.com',
|
'thediplomat.com',
|
||||||
'towardsdatascience.com',
|
'towardsdatascience.com',
|
||||||
'tubantia.nl',
|
|
||||||
'vn.nl',
|
'vn.nl',
|
||||||
'vulture.com',
|
'vulture.com',
|
||||||
'wsj.com',
|
'wsj.com',
|
||||||
@ -139,19 +127,11 @@ const removeCookiesSelectHold = {
|
|||||||
|
|
||||||
// select only specific cookie(s) to drop from removeCookies domains
|
// select only specific cookie(s) to drop from removeCookies domains
|
||||||
const removeCookiesSelectDrop = {
|
const removeCookiesSelectDrop = {
|
||||||
'ad.nl': ['temptationTrackingId'],
|
|
||||||
'ambito.com': ['TDNotesRead'],
|
'ambito.com': ['TDNotesRead'],
|
||||||
'bd.nl': ['temptationTrackingId'],
|
|
||||||
'bndestem.nl': ['temptationTrackingId'],
|
|
||||||
'demorgen.be': ['TID_ID'],
|
'demorgen.be': ['TID_ID'],
|
||||||
'destentor.nl': ['temptationTrackingId'],
|
|
||||||
'ed.nl': ['temptationTrackingId'],
|
|
||||||
'fd.nl': ['socialread'],
|
'fd.nl': ['socialread'],
|
||||||
'gelderlander.nl': ['temptationTrackingId'],
|
|
||||||
'humo.be': ['TID_ID'],
|
'humo.be': ['TID_ID'],
|
||||||
'nrc.nl': ['counter'],
|
'nrc.nl': ['counter'],
|
||||||
'pzc.nl': ['temptationTrackingId'],
|
|
||||||
'tubantia.nl': ['temptationTrackingId'],
|
|
||||||
'speld.nl': ['speld-paywall']
|
'speld.nl': ['speld-paywall']
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -178,11 +158,14 @@ 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
|
||||||
const useBingBot = [
|
const useBingBot = [];
|
||||||
|
|
||||||
|
const useMsnBot = [
|
||||||
'haaretz.co.il',
|
'haaretz.co.il',
|
||||||
'haaretz.com',
|
'haaretz.com',
|
||||||
'themarker.com'
|
'themarker.com'
|
||||||
@ -244,19 +227,22 @@ const blockedRegexes = {
|
|||||||
'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)/,
|
'nytimes.com': /(\.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': /\.californiatimes\.com\/meteringjs/,
|
||||||
'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\//,
|
'japantimes.co.jp': /cdn\.cxense\.com\//,
|
||||||
'scmp.com': /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/,
|
'scmp.com': /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/,
|
||||||
'ilmessaggero.it': /(utils\.cedsdigital\.it\/js\/PaywallMeter\.js)/,
|
'ilmessaggero.it': /(utils\.cedsdigital\.it\/js\/PaywallMeter\.js)/,
|
||||||
'washingtonpost.com': /\.washingtonpost\.com\/tetro\/metering\/evaluate/
|
'washingtonpost.com': /\.washingtonpost\.com\/tetro\/metering\/evaluate/,
|
||||||
|
'theatlantic.com': /cdn\.theatlantic\.com\/_next\/static\/chunks\/pages\/.+\/archive\//,
|
||||||
|
'bloomberg.com': /(\.cm\.bloomberg\.com\/|assets\.bwbx\.io\/s\d\/javelin\/.+\/transporter\/)/
|
||||||
};
|
};
|
||||||
|
|
||||||
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)';
|
||||||
const userAgentMobile = 'Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)';
|
const userAgentMobile = 'Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)';
|
||||||
const userAgentDesktopBingBot = 'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)';
|
const userAgentDesktopBingBot = 'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)';
|
||||||
const userAgentMobileBingBot = 'Chrome/80.0.3987.92 Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)';
|
const userAgentMobileBingBot = 'Chrome/80.0.3987.92 Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)';
|
||||||
|
const userAgentMsnBot = 'msnbot/2.0b (+http://search.msn.com/msnbot.htm)';
|
||||||
|
|
||||||
let enabledSites = [];
|
let enabledSites = [];
|
||||||
|
|
||||||
@ -325,6 +311,24 @@ extensionApi.webRequest.onBeforeRequest.addListener(function (details) {
|
|||||||
['blocking']
|
['blocking']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// nytimes.com
|
||||||
|
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']);
|
||||||
|
|
||||||
// Disable javascript for these sites
|
// Disable javascript for these sites
|
||||||
extensionApi.webRequest.onBeforeRequest.addListener(function (details) {
|
extensionApi.webRequest.onBeforeRequest.addListener(function (details) {
|
||||||
const headerReferer = details.originUrl ? details.originUrl : details.initiator;
|
const headerReferer = details.originUrl ? details.originUrl : details.initiator;
|
||||||
@ -445,6 +449,14 @@ extensionApi.webRequest.onBeforeSendHeaders.addListener(function (details) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// override User-Agent to use Google AdsBot Mobile Web
|
||||||
|
if (matchUrlDomain(useMsnBot, details.url)) {
|
||||||
|
requestHeaders.push({
|
||||||
|
name: 'User-Agent',
|
||||||
|
value: userAgentMsnBot
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// remove cookies before page load
|
// remove cookies before page load
|
||||||
const enabledCookies = allowCookies.some(function (site) {
|
const enabledCookies = allowCookies.some(function (site) {
|
||||||
return matchUrlDomain(site, details.url);
|
return matchUrlDomain(site, details.url);
|
||||||
@ -519,6 +531,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) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if (!matchDomain(['seekingalpha.com', 'sfchronicle.com', 'cen.acs.org', 'elmundo.es', 'scmp.com'])) {
|
if (!matchDomain(['seekingalpha.com', 'sfchronicle.com', 'cen.acs.org', 'elmundo.es', 'scmp.com', 'nytimes.com'])) {
|
||||||
window.localStorage.clear();
|
window.localStorage.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,9 +73,6 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (matchDomain(['ad.nl', 'ed.nl', 'bndestem.nl', 'bd.nl', 'tubantia.nl', 'destentor.nl', 'pzc.nl', 'gelderlander.nl'])) {
|
|
||||||
const paywall = document.querySelector('.article__component.article__component--paywall-module-notification');
|
|
||||||
removeDOMElement(paywall);
|
|
||||||
} else if (matchDomain('washingtonpost.com')) {
|
} else if (matchDomain('washingtonpost.com')) {
|
||||||
const leaderboard = document.querySelector('#leaderboard-wrapper');
|
const leaderboard = document.querySelector('#leaderboard-wrapper');
|
||||||
const adverts = document.querySelectorAll('div[data-qa="article-body-ad"]');
|
const adverts = document.querySelectorAll('div[data-qa="article-body-ad"]');
|
||||||
@ -207,7 +204,15 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
const paywall = document.getElementsByClassName('paywall')[0];
|
const paywall = document.getElementsByClassName('paywall')[0];
|
||||||
removeDOMElement(paywall);
|
removeDOMElement(paywall);
|
||||||
} else if (matchDomain('bloomberg.com')) {
|
} else if (matchDomain('bloomberg.com')) {
|
||||||
blockElement('#graphics-paywall-overlay', true);
|
const paywall = document.querySelectorAll('div[id^="fortress-"]');
|
||||||
|
const leaderboard = document.querySelector('div[id^="leaderboard"], div[class^="leaderboard"], div.canopy-container');
|
||||||
|
const ads = document.querySelectorAll('div[data-ad-status], div.dvz-v0-ad, div[class^="FullWidthAd_"]');
|
||||||
|
hideDOMElement(...paywall, leaderboard, ...ads);
|
||||||
|
if (window.location.pathname.startsWith('/live/')) {
|
||||||
|
setInterval(function () {
|
||||||
|
window.localStorage.clear();
|
||||||
|
}, 15 * 60 * 1000);
|
||||||
|
}
|
||||||
} else if (matchDomain('bloombergquint.com')) {
|
} else if (matchDomain('bloombergquint.com')) {
|
||||||
const articlesLeftModal = document.getElementsByClassName('paywall-meter-module__story-paywall-container__1UgCE')[0];
|
const articlesLeftModal = document.getElementsByClassName('paywall-meter-module__story-paywall-container__1UgCE')[0];
|
||||||
const paywall = document.getElementById('paywallDmp');
|
const paywall = document.getElementById('paywallDmp');
|
||||||
@ -261,7 +266,7 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
removeDOMElement(counter, coBanner, support);
|
removeDOMElement(counter, coBanner, support);
|
||||||
});
|
});
|
||||||
} else if (matchDomain('nytimes.com')) {
|
} else if (matchDomain('nytimes.com')) {
|
||||||
const banners = document.querySelectorAll('div[data-testid="inline-message"], div[id^="ad-"], div.expanded-dock');
|
const banners = document.querySelectorAll('div[data-testid="inline-message"], div[id^="ad-"], div.expanded-dock, div.pz-ad-box');
|
||||||
removeDOMElement(...banners);
|
removeDOMElement(...banners);
|
||||||
} else if (matchDomain('technologyreview.com')) {
|
} else if (matchDomain('technologyreview.com')) {
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
@ -449,14 +454,10 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
});
|
});
|
||||||
}, 1000); // Delay (in milliseconds)
|
}, 1000); // Delay (in milliseconds)
|
||||||
} else if (matchDomain('theatlantic.com')) {
|
} else if (matchDomain('theatlantic.com')) {
|
||||||
// Remove all nudge elements
|
const images = document.querySelectorAll('img[class*="Image_lazy__"]');
|
||||||
document.querySelectorAll('div[class*="c-nudge"]').forEach(function (el) {
|
for (const elem of images) { removeClassesByPrefix(elem, 'Image_lazy__'); }
|
||||||
removeDOMElement(el);
|
const banners = document.querySelectorAll('.c-nudge__container, .c-non-metered-nudge, div[class^="ArticleInjector_"]');
|
||||||
});
|
hideDOMElement(...banners);
|
||||||
// Remove all FancyBox ads
|
|
||||||
document.querySelectorAll('div[class*="fancybox"]').forEach(function (el) {
|
|
||||||
removeDOMElement(el);
|
|
||||||
});
|
|
||||||
} else if (matchDomain('theathletic.com')) {
|
} else if (matchDomain('theathletic.com')) {
|
||||||
if (!window.location.search.match(/(\?|&)amp/)) {
|
if (!window.location.search.match(/(\?|&)amp/)) {
|
||||||
const paywall = document.querySelector('div#slideup-paywall');
|
const paywall = document.querySelector('div#slideup-paywall');
|
||||||
@ -644,16 +645,8 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
body.removeAttribute('class');
|
body.removeAttribute('class');
|
||||||
}
|
}
|
||||||
} else if (matchDomain('latimes.com')) {
|
} else if (matchDomain('latimes.com')) {
|
||||||
const paywall = document.querySelector('metering-modal');
|
const ads = document.querySelectorAll('div.enhancement, div.google-dfp-ad-wrapper');
|
||||||
const incognitoWall = document.querySelector('metering-toppanel');
|
hideDOMElement(...ads);
|
||||||
if (paywall) {
|
|
||||||
removeDOMElement(paywall);
|
|
||||||
} else if (incognitoWall) {
|
|
||||||
removeDOMElement(incognitoWall);
|
|
||||||
}
|
|
||||||
if (paywall || incognitoWall) {
|
|
||||||
document.body.removeAttribute('style');
|
|
||||||
}
|
|
||||||
} else if (matchDomain('foreignpolicy.com')) {
|
} else if (matchDomain('foreignpolicy.com')) {
|
||||||
const contentUngated = document.querySelector('div.content-ungated');
|
const contentUngated = document.querySelector('div.content-ungated');
|
||||||
removeDOMElement(contentUngated);
|
removeDOMElement(contentUngated);
|
||||||
@ -716,6 +709,13 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
const ads = document.querySelectorAll('amp-ad, div.ad-banner, div.advert-fly-carpet-container, div.inline-advert');
|
const ads = document.querySelectorAll('amp-ad, div.ad-banner, div.advert-fly-carpet-container, div.inline-advert');
|
||||||
removeDOMElement(...defaultMeters, ...ads);
|
removeDOMElement(...defaultMeters, ...ads);
|
||||||
}
|
}
|
||||||
|
} else if (matchDomain('fortune.com')) {
|
||||||
|
const paywalledArticle = document.querySelector('.paywall.paywallActive');
|
||||||
|
if (paywalledArticle) {
|
||||||
|
for (const clazz of ['paywall', 'paywallActive']) {
|
||||||
|
paywalledArticle.classList.remove(clazz);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchDomain (domains) {
|
function matchDomain (domains) {
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
// Cookies from this list are blocked by default
|
// Cookies from this list are blocked by default
|
||||||
const defaultSites = {
|
const defaultSites = {
|
||||||
'Adweek': 'adweek.com',
|
'Adweek': 'adweek.com',
|
||||||
'Algemeen Dagblad': 'ad.nl',
|
|
||||||
'\u00C1mbito': 'ambito.com',
|
'\u00C1mbito': 'ambito.com',
|
||||||
'American Banker': 'americanbanker.com',
|
'American Banker': 'americanbanker.com',
|
||||||
'Baltimore Sun': 'baltimoresun.com',
|
'Baltimore Sun': 'baltimoresun.com',
|
||||||
'Barron\'s': 'barrons.com',
|
'Barron\'s': 'barrons.com',
|
||||||
'Bloomberg': 'bloomberg.com',
|
'Bloomberg': 'bloomberg.com',
|
||||||
'Bloomberg Quint (free articles only)': 'bloombergquint.com',
|
'Bloomberg Quint (free articles only)': 'bloombergquint.com',
|
||||||
'BN De Stem': 'bndestem.nl',
|
|
||||||
'Boston Globe': 'bostonglobe.com',
|
'Boston Globe': 'bostonglobe.com',
|
||||||
'Brabants Dagblad': 'bd.nl',
|
|
||||||
'Brisbane Times': 'brisbanetimes.com.au',
|
'Brisbane Times': 'brisbanetimes.com.au',
|
||||||
'Business Insider': 'businessinsider.com',
|
'Business Insider': 'businessinsider.com',
|
||||||
'Caixin': 'caixinglobal.com',
|
'Caixin': 'caixinglobal.com',
|
||||||
@ -20,18 +17,15 @@ const defaultSites = {
|
|||||||
'Corriere Della Sera': 'corriere.it',
|
'Corriere Della Sera': 'corriere.it',
|
||||||
'Crain\'s Chicago Business': 'chicagobusiness.com',
|
'Crain\'s Chicago Business': 'chicagobusiness.com',
|
||||||
'Daily Press': 'dailypress.com',
|
'Daily Press': 'dailypress.com',
|
||||||
'De Gelderlander': 'gelderlander.nl',
|
|
||||||
'De Groene Amsterdammer': 'groene.nl',
|
'De Groene Amsterdammer': 'groene.nl',
|
||||||
'DeMorgen': 'demorgen.be',
|
'DeMorgen': 'demorgen.be',
|
||||||
'Denver Post': 'denverpost.com',
|
'Denver Post': 'denverpost.com',
|
||||||
'De Speld': 'speld.nl',
|
'De Speld': 'speld.nl',
|
||||||
'De Stentor': 'destentor.nl',
|
|
||||||
'De Tijd': 'tijd.be',
|
'De Tijd': 'tijd.be',
|
||||||
'de Volkskrant': 'volkskrant.nl',
|
'de Volkskrant': 'volkskrant.nl',
|
||||||
'Diario Financiero': 'df.cl',
|
'Diario Financiero': 'df.cl',
|
||||||
'Domani': 'editorialedomani.it',
|
'Domani': 'editorialedomani.it',
|
||||||
'Dynamed Plus': 'dynamed.com',
|
'Dynamed Plus': 'dynamed.com',
|
||||||
'Eindhovens Dagblad': 'ed.nl',
|
|
||||||
'El Mercurio': 'elmercurio.com',
|
'El Mercurio': 'elmercurio.com',
|
||||||
'El Mundo': 'elmundo.es',
|
'El Mundo': 'elmundo.es',
|
||||||
'El Pais': 'elpais.com',
|
'El Pais': 'elpais.com',
|
||||||
@ -99,7 +93,6 @@ const defaultSites = {
|
|||||||
'Palo Alto Online': 'paloaltoonline.com',
|
'Palo Alto Online': 'paloaltoonline.com',
|
||||||
'Parool': 'parool.nl',
|
'Parool': 'parool.nl',
|
||||||
'Postimees': 'postimees.ee',
|
'Postimees': 'postimees.ee',
|
||||||
'PZC': 'pzc.nl',
|
|
||||||
'Quartz (free articles only)': 'qz.com',
|
'Quartz (free articles only)': 'qz.com',
|
||||||
'Quora': 'quora.com',
|
'Quora': 'quora.com',
|
||||||
'Quotidiani Gelocal': 'gelocal.it',
|
'Quotidiani Gelocal': 'gelocal.it',
|
||||||
@ -168,7 +161,6 @@ const defaultSites = {
|
|||||||
'Times Literary Supplement': 'the-tls.co.uk',
|
'Times Literary Supplement': 'the-tls.co.uk',
|
||||||
'Towards Data Science': 'towardsdatascience.com',
|
'Towards Data Science': 'towardsdatascience.com',
|
||||||
'Trouw': 'trouw.nl',
|
'Trouw': 'trouw.nl',
|
||||||
'Tubantia': 'tubantia.nl',
|
|
||||||
'Vanity Fair': 'vanityfair.com',
|
'Vanity Fair': 'vanityfair.com',
|
||||||
'Vrij Nederland': 'vn.nl',
|
'Vrij Nederland': 'vn.nl',
|
||||||
'Vulture': 'vulture.com',
|
'Vulture': 'vulture.com',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user