mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-30 02:34:26 +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 Wall Street Journal](https://www.wsj.com)\
|
||||
[The Washington Post](https://www.washingtonpost.com)\
|
||||
[The Wrap](https://www.thewrap.com)\
|
||||
[TheMarker](https://www.themarker.com)\
|
||||
[Times Literary Supplement](https://www.the-tls.co.uk)\
|
||||
[Towards Data Science](https://www.towardsdatascience.com)\
|
||||
|
@ -45,6 +45,7 @@
|
||||
"*://*.theglobeandmail.com/*",
|
||||
"*://*.thehindu.com/*",
|
||||
"*://*.thestar.com/*",
|
||||
"*://*.thewrap.com/*",
|
||||
"*://*.trouw.nl/*",
|
||||
"*://*.volkskrant.nl/*",
|
||||
"*://*.washingtonpost.com/*",
|
||||
@ -202,6 +203,7 @@
|
||||
"*://*.thesaturdaypaper.com.au/*",
|
||||
"*://*.thestar.com/*",
|
||||
"*://*.thetimes.co.uk/*",
|
||||
"*://*.thewrap.com/*",
|
||||
"*://*.tijd.be/*",
|
||||
"*://*.towardsdatascience.com/*",
|
||||
"*://*.trouw.nl/*",
|
||||
|
@ -178,6 +178,7 @@ const blockedRegexes = {
|
||||
'thecourier.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/,
|
||||
'theglobeandmail.com': /theglobeandmail\.com\/pb\/resources\/scripts\/build\/chunk-bootstraps\/.+\.js/,
|
||||
'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)"
|
||||
|
@ -414,6 +414,16 @@ if (matchDomain('techinasia.com')) {
|
||||
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) {
|
||||
var hostname = window.location.hostname;
|
||||
if (typeof domains === 'string')
|
||||
|
@ -121,6 +121,7 @@ const defaultSites = {
|
||||
'The Toronto Star': 'thestar.com',
|
||||
'The Wall Street Journal': 'wsj.com',
|
||||
'The Washington Post': 'washingtonpost.com',
|
||||
'The Wrap': 'thewrap.com',
|
||||
'Times Literary Supplement': 'the-tls.co.uk',
|
||||
'Towards Data Science': 'towardsdatascience.com',
|
||||
'Trouw': 'trouw.nl',
|
||||
|
Loading…
x
Reference in New Issue
Block a user