diff --git a/README.md b/README.md index 2c269c37..50f75e85 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ _* free/cached articles only._ [S&P Global](https://www.spglobal.com) - [Seeking Alpha](https://seekingalpha.com) - [Stock News](https://stocknews.com) - -[The Business Journals](https://www.bizjournals.com) - +[The Business Journals](https://www.bizjournals.com)* - [The Business of Fashion](https://www.businessoffashion.com) - [The Wall Street Journal](https://www.wsj.com) - [Vogue Business](https://www.voguebusiness.com) diff --git a/changelog.txt b/changelog.txt index 21d97610..38d25a74 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Fix Knack.be & LeVif.be (subdomains-text) * v2.7.4.0 (2022-07-03) Add Beobachter.ch diff --git a/contentScript.js b/contentScript.js index 20df39fb..40a2cd8c 100644 --- a/contentScript.js +++ b/contentScript.js @@ -82,13 +82,15 @@ if ((bg2csData !== undefined) && bg2csData.ld_json && dompurify_loaded) { var div_bpc_done = document.querySelector('div#bpc_done'); if (!div_bpc_done) { -ext_api.runtime.onMessage.addListener( - function(request, sender) { - if (request.msg === 'showExtSrc') { - replaceDomElementExtSrc(request.data.url, request.data.html, true, false, request.data.selector, request.data.text_fail, request.data.selector_source); - } - } -); +if (ext_api.runtime) { + ext_api.runtime.onMessage.addListener( + function(request, sender) { + if (request.msg === 'showExtSrc') { + replaceDomElementExtSrc(request.data.url, request.data.html, true, false, request.data.selector, request.data.text_fail, request.data.selector_source); + } + } + ) +} // check for opt-in confirmation (from background.js) if ((bg2csData !== undefined) && bg2csData.optin_setcookie) { @@ -1928,7 +1930,7 @@ else if (matchDomain(['gva.be', 'hbvl.be', 'nieuwsblad.be'])) { } else if (matchDomain(['knack.be', 'levif.be'])) { - let paywall = document.querySelector('#paywall-modal, #datawall-modal'); + let paywall = document.querySelector('div[id*="wall-modal"]'); if (paywall) { removeDOMElement(paywall); function knack_noscroll(node) { @@ -1936,6 +1938,8 @@ else if (matchDomain(['knack.be', 'levif.be'])) { node.removeAttribute('class'); } waitDOMAttribute('html', 'html', 'style', knack_noscroll, true); + let intro = document.querySelectorAll('div.article-body > p, div.article-body > style'); + removeDOMElement(...intro); } } diff --git a/manifest.json b/manifest.json index 31267398..9cbbfb5b 100644 --- a/manifest.json +++ b/manifest.json @@ -688,5 +688,5 @@ "*://*.wsj.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.7.4.0" + "version": "2.7.4.1" } diff --git a/sites.js b/sites.js index ad7c12ef..ec782591 100644 --- a/sites.js +++ b/sites.js @@ -876,7 +876,7 @@ var defaultSites = { "Knack.be": { domain: "knack.be", allow_cookies: 1, - block_regex: /\.blueconic\.net\// + block_regex: /(\.knack\.be\/js\/responsive\/rmg(Modal|Paywall)\.js|\.blueconic\.net\/)/ }, "Kölner Stadt-Anzeiger": { domain: "ksta.de", @@ -1034,7 +1034,7 @@ var defaultSites = { "Le Vif.be": { domain: "levif.be", allow_cookies: 1, - block_regex: /\.blueconic\.net\// + block_regex: /(\.levif\.be\/js\/responsive\/rmg(Modal|Paywall)\.js|\.blueconic\.net\/)/ }, "Lee Enterprises Group": { domain: "###_usa_lee_ent", @@ -1632,7 +1632,7 @@ var defaultSites = { allow_cookies: 1, block_regex: /(\.blueconic\.net\/|meter\.bostonglobe\.com\/js\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/ }, - "The Business Journals": { + "The Business Journals (free articles only)": { domain: "bizjournals.com", block_regex: /(assets\.bizjournals\.com\/static\/js\/app\/cxense\.js|cdn\.cxense\.com\/)/ }, diff --git a/sites_updated.json b/sites_updated.json index 27d3529f..c3fedb9e 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -77,6 +77,24 @@ "useragent": "googlebot", "new_site": 1 }, + "Knack.be": { + "domain": "knack.be", + "allow_cookies": 1, + "block_regex": "(\\.knack\\.be\\/js\\/responsive\\/rmg(Modal|Paywall)\\.js|\\.blueconic\\.net\\/)", + "cs_code": [{ + "cond": "div[id*=\"wall-modal\"]", + "rm_elem": 1, + "elems": [{ + "cond": "div.article-body > p", + "rm_elem": 1 + }, { + "cond": "div.article-body > style", + "rm_elem": 1 + } + ] + } + ] + }, "L'Avenir": { "domain": "lavenir.net", "allow_cookies": 1, @@ -92,6 +110,24 @@ ], "new_site": 1 }, + "Le Vif.be": { + "domain": "levif.be", + "allow_cookies": 1, + "block_regex": "(\\.levif\\.be\\/js\\/responsive\\/rmg(Modal|Paywall)\\.js|\\.blueconic\\.net\\/)", + "cs_code": [{ + "cond": "div[id*=\"wall-modal\"]", + "rm_elem": 1, + "elems": [{ + "cond": "div.article-body > p", + "rm_elem": 1 + }, { + "cond": "div.article-body > style", + "rm_elem": 1 + } + ] + } + ] + }, "The Banker": { "allow_cookies": 1, "domain": "thebanker.com",