mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:31:57 +01:00
Fix-update Telegraph.co.uk (amp pages)
This commit is contained in:
parent
ddf47019f3
commit
1b6ea3b4e8
4 changed files with 20 additions and 4 deletions
|
@ -187,7 +187,7 @@ var blockedRegexes = {
|
|||
'chicagotribune.com': /.+:\/\/.+\.tribdss\.com\/.+/,
|
||||
'chronicle.com': /(.+\.blueconic\.net\/.+|assets\.login\.chronicle\.com\/common\/che-auth0-user\.js)/,
|
||||
'clarin.com': /js\.matheranalytics\.com\/.+/,
|
||||
'corriere.it': /(cdn\.tinypass\.com\/.+|\.rcsobjects\.it\/(rcs_cpmt|rcs_tracking-service)\/|\.corriereobjects\.it\/.+\/js\/(_paywall\.sjs|tracking\/)|\.userzoom\.com\/files\/js\/)/,
|
||||
'corriere.it': /(cdn\.tinypass\.com\/|\.rcsobjects\.it\/rcs_(cpmt|tracking-service)\/|\.corriereobjects\.it\/.+\/js\/(_paywall\.sjs|tracking\/)|\.userzoom\.com\/files\/js\/)/,
|
||||
'digiday.com': /cdn\.tinypass\.com\/.+/,
|
||||
'dvhn.nl': /.+\.evolok\.net\/.+\/authorize\/.+/,
|
||||
'economist.com': /cdn\.tinypass\.com\/.+/,
|
||||
|
@ -264,7 +264,7 @@ var blockedRegexes = {
|
|||
'spectator.com.au': /cdn\.tinypass\.com\/.+/,
|
||||
'spectator.us': /(cdn\.cxense\.com\/.+|cdn\.tinypass\.com\/.+)/,
|
||||
'technologyreview.com': /.+\.blueconic\.net\/.+/,
|
||||
'telegraph.co.uk': /(cdn\.tinypass\.com\/.+|.+\.telegraph\.co\.uk\/.+\/piano.+\.js|assets\.adobedtm\.com\/.+\.js)/,
|
||||
'telegraph.co.uk': /(cdn\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|consent)-.+\.js|\.telegraph\.co\.uk\/.+\/piano.+\.js|assets\.adobedtm\.com\/.+\.js)/,
|
||||
'theage.com.au': /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/,
|
||||
'thedailybeast.com': /cdn\.tinypass\.com\/.+/,
|
||||
'thehindu.com': /(cdn\.cxense\.com\/.+|cdn\.tinypass\.com\/.+)/,
|
||||
|
@ -724,8 +724,9 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
|||
let es_grupo_vocento_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(es_grupo_vocento_domains, header_referer) && isSiteEnabled({url: header_referer}));
|
||||
let fr_lacroix_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain('la-croix.com', header_referer) && isSiteEnabled({url: header_referer}));
|
||||
let sz_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain('sueddeutsche.de', header_referer) && isSiteEnabled({url: header_referer}));
|
||||
let uk_telegraph_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain('telegraph.co.uk', header_referer) && isSiteEnabled({url: header_referer}));
|
||||
|
||||
if (!isSiteEnabled(details) && !inkl_site && !bloomberg_site && !au_nc_amp_site && !au_apn_site && !au_swm_site && !es_grupo_vocento_site && !fr_lacroix_amp_site && !sz_amp_site) {
|
||||
if (!isSiteEnabled(details) && !inkl_site && !bloomberg_site && !au_nc_amp_site && !au_apn_site && !au_swm_site && !es_grupo_vocento_site && !fr_lacroix_amp_site && !sz_amp_site && !uk_telegraph_amp_site) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ Post-release
|
|||
Add El Comercio, Ideal & La Voz de Cadiz (Spain)
|
||||
Add The Spectator USA
|
||||
Fix-update El Mercurio & La Segunda (mobile)
|
||||
Fix-update Telegraph.co.uk (amp pages)
|
||||
|
||||
* v1.9.7.0 (2020-11-27)
|
||||
Add Alma Talent sites (Finland)
|
||||
|
|
|
@ -1732,6 +1732,20 @@ else if (matchDomain('lasegunda.com')) {
|
|||
}
|
||||
}
|
||||
|
||||
else if (matchDomain("telegraph.co.uk")) {
|
||||
let url = window.location.href;
|
||||
if (new URL(url).pathname.endsWith('/amp/')) {
|
||||
let paywall = document.querySelector('.premium-paywall');
|
||||
if (paywall) {
|
||||
let truncated_content = document.querySelector('.truncated-content');
|
||||
removeDOMElement(paywall, truncated_content);
|
||||
let subscr_section = document.querySelector('.notAccessibleForFree');
|
||||
if (subscr_section)
|
||||
subscr_section.removeAttribute('amp-access-hide');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// General Functions
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
|
|
|
@ -371,5 +371,5 @@
|
|||
"*://*.repstatic.it/*",
|
||||
"*://*.userzoom.com/*"
|
||||
],
|
||||
"version": "1.9.7.2"
|
||||
"version": "1.9.7.3"
|
||||
}
|
Loading…
Reference in a new issue