Fix McClatchy Group (amp-redirect & disable)

merge-requests/3/head
magnolia1234 2 years ago
parent 566f699c6f
commit 27b3d9b986

@ -751,8 +751,8 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
// block script for additional McClatchy sites (opt-in to custom sites)
var usa_mcc_domains = grouped_sites['###_usa_mcc'];
var usa_mcc_domain = ((matchUrlDomain('mcclatchyinteractive.com', details.url) && ['script'].includes(details.type)) ||
(matchUrlDomain('mcclatchy-wires.com', details.url) && ['image'].includes(details.type)) &&
var usa_mcc_domain = (((matchUrlDomain('mcclatchyinteractive.com', details.url) && ['script'].includes(details.type)) ||
(matchUrlDomain('mcclatchy-wires.com', details.url) && ['image'].includes(details.type))) &&
!matchUrlDomain(usa_mcc_domains, header_referer) && enabledSites.includes('###_usa_mcc'));
if (usa_mcc_domain) {
let mcc_domain = urlHost(header_referer).replace(/^(account|amp)\./, '');

@ -5,6 +5,7 @@ Post-release
Add Mainichi Shimbun (Japan)
Remove De Tijd & L'Echo
Fix Bloomberg (quotes)
Fix McClatchy Group (amp-redirect & disable)
Fix Prospect Magazine (timing)
Fix Star Tribune (timing)
Update popup (domain to clear cookies)
@ -225,7 +226,7 @@ Fix The Daily Beast (proper/images)
* v2.3.3.0 (2021-08-15)
Add Live Law (India)
Add Sanoma Media Finland (+ aamulehti.fi & regional/opt-in)
Fix group McClatchy (unlisted sites)
Fix McClatchy Group (unlisted sites)
Fix MediaNama (modal)
Fix The Athletic
Fix The Daily Beast (members-only)
@ -272,7 +273,7 @@ Fix WaPo (magazine)
Add TradeWinds
Fix Discover Magazine
Fix Il Secolo XIX (amp-redirect)
Fix Miami Herald (group McClatchy)
Fix Miami Herald (McClatchy Group)
Fix New Left Review (timing)
Fix WaPo (disable Googlebot & fix amp/interactive)
Maintenance contentScript (update sanitize html-input)
@ -406,7 +407,7 @@ Add Aachener-Zeitung.de (RP-medien)
Add Apollo Magazine
Add NK News (not pro)
Add Nordwest Zeitung (Germany)
Fix group McClatchy (opt-in to custom sites for unlisted)
Fix McClatchy Group (opt-in to custom sites for unlisted)
Fix Wired (Googlebot)
Fix WSJ (option to disable Googlebot; http error 500)
@ -466,7 +467,7 @@ Update limit contentScript (add image/sub_frame)
* v2.0.8.0 (2021-02-14)
Add Augsburger-Allgemeine.de
Add group McClatchy (USA)
Add McClatchy Group (USA)
Add Neue Osnabruecker Zeitung (Germany)
Add Time Magazine
Fix Cors Anywhere (link to allow access)

@ -3290,7 +3290,7 @@ else if ((domain = matchDomain(usa_mcc_domains)) || document.querySelector('scri
let url = window.location.href;
if (url.includes('account.' + domain + '/paywall/')) {
window.setTimeout(function () {
window.location.href = 'https://amp.' + domain + '/article' + url.split('resume=')[1].split('#')[0] + '.html';
window.location.href = 'https://amp.' + domain + '/article' + url.split('resume=')[1].split(/[#&]/)[0] + '.html';
}, 500); // Delay (in milliseconds)
} else if (url.includes('amp.' + domain + '/')) {
amp_unhide_subscr_section();

@ -605,5 +605,5 @@
"*://*.wsj.net/*",
"*://*.zephr.com/*"
],
"version": "2.5.1.3"
"version": "2.5.1.4"
}

@ -1014,7 +1014,7 @@ var defaultSites = {
"thestate.com",
"tri-cityherald.com"
],
block_regex: /(js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/
block_regex: /(js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|subscriptions)-.+\.js)/
},
"Mediahuis Nederland Regional": {
domain: "###_nl_mediahuis_region",

Loading…
Cancel
Save