Fix The New Yorker (update)

This commit is contained in:
magnolia1234 2022-01-17 19:05:26 +01:00
parent 07a67f24d5
commit 7c6df95947
5 changed files with 19 additions and 38 deletions

View file

@ -980,7 +980,7 @@ if (matchUrlDomain(change_headers, details.url) && !['font', 'image', 'styleshee
} }
if ((!['font', 'stylesheet'].includes(details.type) || matchUrlDomain(cs_limit_except, currentTabUrl)) && !csDone) { if ((!['font', 'stylesheet'].includes(details.type) || matchUrlDomain(cs_limit_except, currentTabUrl)) && !csDone) {
let lib_file = 'lib/empty.js'; let lib_file = 'lib/empty.js';
if (matchUrlDomain(['bloomberg.com', 'cicero.de', 'economictimes.com', 'hs.fi', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newyorker.com', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'stratfor.com', 'sudouest.fr', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains), currentTabUrl)) if (matchUrlDomain(['bloomberg.com', 'cicero.de', 'economictimes.com', 'hs.fi', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'stratfor.com', 'sudouest.fr', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains), currentTabUrl))
lib_file = 'lib/purify.min.js'; lib_file = 'lib/purify.min.js';
var bg2csData = { var bg2csData = {
optin_setcookie: optin_setcookie, optin_setcookie: optin_setcookie,

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox Changelog Bypass Paywalls Clean - Firefox
Post-release Post-release
Fix The New Yorker (update)
* v2.5.2.0 (2022-01-16) * v2.5.2.0 (2022-01-16)
Add Mainichi Shimbun (Japan) Add Mainichi Shimbun (Japan)

View file

@ -2625,26 +2625,12 @@ else if (matchDomain('newsday.com')) {
} }
} }
else if (matchDomain(['newyorker.com', 'vanityfair.com', 'wired.com'])) {
else if (matchDomain('newyorker.com') && window.location.pathname.length > 1) {
if (window.location.pathname.endsWith('/amp')) { if (window.location.pathname.endsWith('/amp')) {
amp_unhide_subscr_section('.ad'); amp_unhide_subscr_section('.ad');
} else { } else {
let paywall_bar = document.querySelector('.paywall-bar'); let paywall_bar = document.querySelector('.paywall-bar');
removeDOMElement(paywall_bar); removeDOMElement(paywall_bar);
let invisible_assets = document.querySelectorAll('.responsive-asset--invisible');
for (let asset_invisible of invisible_assets)
asset_invisible.classList.remove('responsive-asset--invisible');
let overlays = document.querySelectorAll('.aspect-ratio--overlay-container, .asset-embed__asset-container');
let parser = new DOMParser();
for (let overlay of overlays) {
let noscript = overlay.querySelector('noscript');
if (noscript && noscript.innerHTML && dompurify_loaded) {
let html = parser.parseFromString(DOMPurify.sanitize(noscript.innerHTML), 'text/html');
overlay.appendChild(html.querySelector('img'));
removeDOMElement(noscript);
}
}
} }
} }
@ -3195,12 +3181,6 @@ else if (matchDomain('usatoday.com')) {
} }
} }
else if (matchDomain('vanityfair.com')) {
if (window.location.pathname.endsWith('/amp')) {
amp_unhide_subscr_section();
}
}
else if (matchDomain('velonews.com')) { else if (matchDomain('velonews.com')) {
let paywall = document.querySelector('div.o-membership-overlay'); let paywall = document.querySelector('div.o-membership-overlay');
if (paywall) { if (paywall) {
@ -3239,13 +3219,6 @@ else if (matchDomain('washingtonpost.com')) {
} }
} }
else if (matchDomain('wired.com')) {
let url = window.location.href.split('?')[0];
if (url.endsWith('/amp')) {
amp_unhide_subscr_section();
}
}
else if (matchDomain('wsj.com')) { else if (matchDomain('wsj.com')) {
let url = window.location.href; let url = window.location.href;
if (location.href.includes('/articles/')) { if (location.href.includes('/articles/')) {

View file

@ -587,7 +587,6 @@
"*://*.flip-pay.com/*", "*://*.flip-pay.com/*",
"*://*.gannett-cdn.com/*", "*://*.gannett-cdn.com/*",
"*://*.hearstnp.com/*", "*://*.hearstnp.com/*",
"*://*.htmedia.in/*",
"*://*.jsdelivr.net/*", "*://*.jsdelivr.net/*",
"*://*.lightboxcdn.com/*", "*://*.lightboxcdn.com/*",
"*://*.loader-cdn.azureedge.net/*", "*://*.loader-cdn.azureedge.net/*",
@ -603,5 +602,5 @@
"*://*.wsj.net/*", "*://*.wsj.net/*",
"*://*.zephr.com/*" "*://*.zephr.com/*"
], ],
"version": "2.5.2.0" "version": "2.5.2.1"
} }

View file

@ -911,7 +911,7 @@ var defaultSites = {
"tulsaworld.com" "tulsaworld.com"
], ],
allow_cookies: 1, allow_cookies: 1,
block_regex: /(api\.bntech\.io\/js\/|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/ block_regex: /(api\.bntech\.io\/js\/|\.com\/shared-content\/art\/tncms\/user\/user\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/
}, },
"Leeuwarder Courant": { "Leeuwarder Courant": {
domain: "lc.nl", domain: "lc.nl",
@ -938,7 +938,8 @@ var defaultSites = {
}, },
"LiveMint": { "LiveMint": {
domain: "livemint.com", domain: "livemint.com",
block_regex: /(\.livemint\.com\/js\/localWorker\.js|analytics\.htmedia\.in\/analytics-js\/.+\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/ allow_cookies: 1,
block_regex: /(\.livemint\.com\/__js\/lm_subscription_.+\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/
}, },
"Loeb Classical Library": { "Loeb Classical Library": {
domain: "loebclassics.com" domain: "loebclassics.com"
@ -1426,7 +1427,8 @@ var defaultSites = {
block_regex: /\.businessoffashion\.com\/zephr\/feature-decisions/ block_regex: /\.businessoffashion\.com\/zephr\/feature-decisions/
}, },
"The Christian Science Monitor": { "The Christian Science Monitor": {
domain: "csmonitor.com" domain: "csmonitor.com",
allow_cookies: 1
}, },
"The Daily Beast": { "The Daily Beast": {
domain: "thedailybeast.com", domain: "thedailybeast.com",
@ -1544,7 +1546,7 @@ var defaultSites = {
}, },
"The New Yorker": { "The New Yorker": {
domain: "newyorker.com", domain: "newyorker.com",
block_regex: /(\.newyorker\.com\/verso\/static\/presenter-articles.+\.js|cdn\.ampproject\.org\/v\d\/amp-(ad|subscriptions)-.+\.js)/ group_rule: "###_gr_usa_conde_nast_domains"
}, },
"The Philadelphia Inquirer": { "The Philadelphia Inquirer": {
domain: "inquirer.com", domain: "inquirer.com",
@ -1581,6 +1583,7 @@ var defaultSites = {
}, },
"The Telegraph": { "The Telegraph": {
domain: "telegraph.co.uk", domain: "telegraph.co.uk",
allow_cookies: 1,
block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js|\.telegraph\.co\.uk\/.+\/piano.+\.js|assets\.adobedtm\.com\/.+\.js)/ block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js|\.telegraph\.co\.uk\/.+\/piano.+\.js|assets\.adobedtm\.com\/.+\.js)/
}, },
"The Times": { "The Times": {
@ -1693,7 +1696,7 @@ var defaultSites = {
}, },
"Vanity Fair": { "Vanity Fair": {
domain: "vanityfair.com", domain: "vanityfair.com",
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(ad|subscriptions)-.+\.js/ group_rule: "###_gr_usa_conde_nast_domains"
}, },
"Variety": { "Variety": {
domain: "variety.com", domain: "variety.com",
@ -1739,8 +1742,7 @@ var defaultSites = {
}, },
"Wired": { "Wired": {
domain: "wired.com", domain: "wired.com",
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(ad|subscriptions)-.+\.js/, group_rule: "###_gr_usa_conde_nast_domains"
useragent: "googlebot"
}, },
"World Politics Review": { "World Politics Review": {
domain: "worldpoliticsreview.com", domain: "worldpoliticsreview.com",
@ -1767,6 +1769,12 @@ var defaultSites = {
remove_cookies_select_drop: ["TID_ID"], remove_cookies_select_drop: ["TID_ID"],
block_regex: "\\.{domain}\\/temptation\\/resolve" block_regex: "\\.{domain}\\/temptation\\/resolve"
}, },
"###_gr_usa_conde_nast_domains": {
group_rule_domains: ["newyorker.com", "vanityfair.com", "wired.com"],
remove_cookies_select_drop: ["pay_ent_smp"],
block_regex: "(journey\\.{domain}\\/build-.+\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-(ad|subscriptions)-.+\\.js)",
useragent: "googlebot"
},
"###_gr_usa_genomeweb_domains": { "###_gr_usa_genomeweb_domains": {
group_rule_domains: ["genomeweb.com", "360dx.com", "precisiononcologynews.com"], group_rule_domains: ["genomeweb.com", "360dx.com", "precisiononcologynews.com"],
allow_cookies: 1, allow_cookies: 1,