mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-05-05 09:44:25 +02:00
Add thewrap.com support (#560)
* Add thewrap.com as #379 * Update src/js/contentScript.js * Update README.md
This commit is contained in:
parent
2e247e735a
commit
c22ec98069
@ -142,6 +142,7 @@
|
|||||||
[The Toronto Star](https://www.thestar.com)\
|
[The Toronto Star](https://www.thestar.com)\
|
||||||
[The Wall Street Journal](https://www.wsj.com)\
|
[The Wall Street Journal](https://www.wsj.com)\
|
||||||
[The Washington Post](https://www.washingtonpost.com)\
|
[The Washington Post](https://www.washingtonpost.com)\
|
||||||
|
[The Wrap](https://www.thewrap.com)\
|
||||||
[TheMarker](https://www.themarker.com)\
|
[TheMarker](https://www.themarker.com)\
|
||||||
[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)\
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
"*://*.theglobeandmail.com/*",
|
"*://*.theglobeandmail.com/*",
|
||||||
"*://*.thehindu.com/*",
|
"*://*.thehindu.com/*",
|
||||||
"*://*.thestar.com/*",
|
"*://*.thestar.com/*",
|
||||||
|
"*://*.thewrap.com/*",
|
||||||
"*://*.trouw.nl/*",
|
"*://*.trouw.nl/*",
|
||||||
"*://*.volkskrant.nl/*",
|
"*://*.volkskrant.nl/*",
|
||||||
"*://*.washingtonpost.com/*",
|
"*://*.washingtonpost.com/*",
|
||||||
@ -202,6 +203,7 @@
|
|||||||
"*://*.thesaturdaypaper.com.au/*",
|
"*://*.thesaturdaypaper.com.au/*",
|
||||||
"*://*.thestar.com/*",
|
"*://*.thestar.com/*",
|
||||||
"*://*.thetimes.co.uk/*",
|
"*://*.thetimes.co.uk/*",
|
||||||
|
"*://*.thewrap.com/*",
|
||||||
"*://*.tijd.be/*",
|
"*://*.tijd.be/*",
|
||||||
"*://*.towardsdatascience.com/*",
|
"*://*.towardsdatascience.com/*",
|
||||||
"*://*.trouw.nl/*",
|
"*://*.trouw.nl/*",
|
||||||
|
@ -178,6 +178,7 @@ const blockedRegexes = {
|
|||||||
'thecourier.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/,
|
'thecourier.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/,
|
||||||
'theglobeandmail.com': /theglobeandmail\.com\/pb\/resources\/scripts\/build\/chunk-bootstraps\/.+\.js/,
|
'theglobeandmail.com': /theglobeandmail\.com\/pb\/resources\/scripts\/build\/chunk-bootstraps\/.+\.js/,
|
||||||
'thenation.com': /thenation\.com\/.+\/paywall-script\.php/,
|
'thenation.com': /thenation\.com\/.+\/paywall-script\.php/,
|
||||||
|
'thewrap.com': /thewrap\.com\/.+\/wallkit\.js/,
|
||||||
};
|
};
|
||||||
|
|
||||||
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)"
|
||||||
|
@ -414,6 +414,16 @@ if (matchDomain('techinasia.com')) {
|
|||||||
removeDOMElement(splash_subscribe, paywall_hard);
|
removeDOMElement(splash_subscribe, paywall_hard);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (matchDomain('thewrap.com')) {
|
||||||
|
const embed = document.querySelector('.embed');
|
||||||
|
if (embed) {
|
||||||
|
// Display feature video
|
||||||
|
const container = document.querySelector('.featured-image-container');
|
||||||
|
removeDOMElement(container);
|
||||||
|
embed.classList.remove('d-none');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function matchDomain(domains) {
|
function matchDomain(domains) {
|
||||||
var hostname = window.location.hostname;
|
var hostname = window.location.hostname;
|
||||||
if (typeof domains === 'string')
|
if (typeof domains === 'string')
|
||||||
|
@ -121,6 +121,7 @@ const defaultSites = {
|
|||||||
'The Toronto Star': 'thestar.com',
|
'The Toronto Star': 'thestar.com',
|
||||||
'The Wall Street Journal': 'wsj.com',
|
'The Wall Street Journal': 'wsj.com',
|
||||||
'The Washington Post': 'washingtonpost.com',
|
'The Washington Post': 'washingtonpost.com',
|
||||||
|
'The Wrap': 'thewrap.com',
|
||||||
'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',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user