diff --git a/background.js b/background.js index 37fca62d..b66a666d 100644 --- a/background.js +++ b/background.js @@ -276,7 +276,7 @@ var blockedRegexes = { 'asiatimes.com': /cdn\.ampproject\.org\/v\d\/amp-(access|ad|analytics)-.+\.(m)?js/, 'atlantico.fr': /\.poool\.fr\//, 'augsburger-allgemeine.de':/(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(ad|subscriptions)-.+\.js)/, - 'barrons.com': /(cdn\.cxense\.com\/.+|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js)/, + 'barrons.com': /(cdn\.cxense\.com\/.+|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent|subscriptions)-.+\.js)/, 'belfasttelegraph.co.uk': /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js)/, 'billboard.com': /(cdn\.cxense\.com\/|\.tinypass\.com\/)/, 'bizjournals.com': /(assets\.bizjournals\.com\/static\/js\/app\/cxense\.js|cdn\.cxense\.com\/)/, @@ -404,7 +404,7 @@ var blockedRegexes = { 'velonews.com': /\.velonews\.com\/.+\/scripts\/contentGate.+\.js/, 'venturebeat.com': /\.wallkit\.net\/js\//, 'washingtonpost.com': /(\.washingtonpost\.com\/.+\/(default-article\/.+\/load_immediately|jqmodal)\/.+\.js|cdn\.ampproject\.org\/.+\/v\d\/amp-(access|(sticky-)?ad|subscriptions)-.+\.js)/, - 'wsj.com': /(cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js|cdn\.cxense\.com\/)/ + 'wsj.com': /(cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent|subscriptions)-.+\.js|cdn\.cxense\.com\/)/ }; // grouped domains in sites.js (for options) @@ -1181,7 +1181,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { let usa_today_site = (matchUrlDomain('gannett-cdn.com', details.url) && matchUrlDomain(['usatoday.com'], header_referer)); allow_ext_source = allow_ext_source || inkl_site || cl_elmerc_site || es_elesp_site || it_repubblica_site || usa_law360_site || usa_mw_site || usa_natgeo_site || usa_today_site; - bpc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(['asiatimes.com', 'augsburger-allgemeine.de', 'barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elpais.com', 'elperiodico.com', 'freiepresse.de', 'handelsblatt.com', 'ilfattoquotidiano.it', 'inc42.com', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'marketwatch.com', 'nationalreview.com', 'noz.de', 'nwzonline.de', 'scmp.com', 'seekingalpha.com', 'shz.de', 'staradvertiser.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk', 'washingtonpost.com'].concat(au_news_corp_domains, au_nine_domains, de_madsack_domains, es_epiberica_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_repubblica_domains, usa_mcc_domains, usa_mng_domains, usa_theathletic_domains), header_referer)); + bpc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(['asiatimes.com', 'augsburger-allgemeine.de', 'barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elpais.com', 'elperiodico.com', 'freiepresse.de', 'handelsblatt.com', 'ilfattoquotidiano.it', 'inc42.com', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'marketwatch.com', 'nationalreview.com', 'noz.de', 'nwzonline.de', 'scmp.com', 'seekingalpha.com', 'shz.de', 'staradvertiser.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk', 'washingtonpost.com', 'wsj.com'].concat(au_news_corp_domains, au_nine_domains, de_madsack_domains, es_epiberica_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_repubblica_domains, usa_mcc_domains, usa_mng_domains, usa_theathletic_domains), header_referer)); } if (!isSiteEnabled(details) && !allow_ext_source && !bpc_amp_site && !au_apn_site && !au_swm_site) { diff --git a/changelog.txt b/changelog.txt index 6a24fb8f..aa32b127 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Fix WSJ & Barron's (amp) * v2.3.6.0 (2021-09-05) Remove WirtschaftsWoche (obsolete) diff --git a/contentScript.js b/contentScript.js index 263167a0..9e71de58 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1689,6 +1689,11 @@ else if (matchDomain('barrons.com')) { let barrons_ads = document.querySelectorAll('.barrons-body-ad-placement'); removeDOMElement(...barrons_ads); } else { + let preview = document.querySelector('section[subscriptions-section="content-not-granted"]'); + removeDOMElement(preview); + let subscr_section = document.querySelector('section[subscriptions-section="content"]'); + if (subscr_section) + subscr_section.removeAttribute('subscriptions-section'); let wsj_ads = document.querySelectorAll('.wsj-ad'); removeDOMElement(...wsj_ads); } @@ -2843,6 +2848,11 @@ else if (matchDomain('wsj.com') && !matchDomain('cn.wsj.com')) { let masthead_link = document.querySelector('div.masthead > a[href*="/articles/"]'); if (masthead_link) masthead_link.href = 'https://www.wsj.com'; + let preview = document.querySelector('section[subscriptions-section="content-not-granted"]'); + removeDOMElement(preview); + let subscr_section = document.querySelector('section[subscriptions-section="content"]'); + if (subscr_section) + subscr_section.removeAttribute('subscriptions-section'); } else { document.addEventListener('DOMContentLoaded', () => { let snippet = document.querySelector('.snippet-promotion'); diff --git a/manifest.json b/manifest.json index e442d392..0240b89e 100644 --- a/manifest.json +++ b/manifest.json @@ -554,5 +554,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.3.6.0" + "version": "2.3.6.1" } \ No newline at end of file