diff --git a/background.js b/background.js index 97188f8..4f3f1f5 100644 --- a/background.js +++ b/background.js @@ -19,7 +19,6 @@ const restrictions = { 'adweek.com': /^((?!\.adweek\.com\/(.+\/)?(amp|agencyspy|tvnewser|tvspy)\/).)*$/, 'barrons.com': /.+\.barrons\.com\/(amp\/)?article(s)?\/.+/, 'bloomberg.com': /^((?!\.bloomberg\.com\/news\/terminal\/).)*$/, - 'bloombergquint.com': /^((?!\.bloombergquint\.com\/bq-blue-exclusive\/).)*$/, 'economictimes.com': /.+\.economictimes\.com\/($|(__assets|prime)(\/.+)?|.+\.cms)/, 'elespanol.com': /^((?!\/cronicaglobal\.elespanol\.com\/).)*$/, 'elpais.com': /(\/elpais\.com\/$|(static|imagenes(\.\w+)?)\.elpais\.com|\/(.+\.)?elpais\.com\/.+\.html)/, diff --git a/changelog.txt b/changelog.txt index d98e4dd..e7551e7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Post-release Add Koelner Stadt-Anzeiger & Koelnische Rundschau Add The (New Orleans) Advocate Remove Caixin Global (obsolete) +Fix Bloomberg (subscriber-only) Fix Bloomberg Quint (bq blue) Fix Inkl (images) Fix Lecho.be (separate from Groupe Rossel) diff --git a/contentScript.js b/contentScript.js index 3469af7..6b77915 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1759,7 +1759,10 @@ else if (matchDomain('bloomberg.com')) { if (json_script && dompurify_loaded) { let json = JSON.parse(json_script.innerHTML); if (json) { - let json_text = json.body ? json.body : ''; + let json_text; + json_text = json.body ? json.body : ''; + if (!json_text) + json_text = json.story.body ? json.story.body : ''; if (json_text) { removeDOMElement(json_script); let article = document.querySelector('div.body-copy-v2:not(.art_done)'); @@ -1768,13 +1771,23 @@ else if (matchDomain('bloomberg.com')) { article = document.querySelector('div.body-copy:not(.art_done)'); article_class = 'body-copy'; } + if (!article) { + article = document.querySelector('div.body-content:not(.art_done)'); + article_class = 'body-content'; + } if (article) { article_class += ' art_done'; let parser = new DOMParser(); let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, {ADD_TAGS: ['iframe', 'script']}) + '
', 'text/html'); let article_new = doc.querySelector('div'); - if (article_new) + if (article_new) { article.parentNode.replaceChild(article_new, article); + let teaser_body = document.querySelector('div.body-content[class*="teaser-content_"]'); + removeDOMElement(teaser_body); + let body_transparent = document.querySelector('div[class*="nearly-transparent-text-blur_"]'); + if (body_transparent) + removeClassesByPrefix(body_transparent, 'nearly-transparent-text-blur_'); + } } } } diff --git a/sites.js b/sites.js index 5429bcd..c3f0bfe 100644 --- a/sites.js +++ b/sites.js @@ -188,7 +188,7 @@ var defaultSites = { }, "Bloomberg": { domain: "bloomberg.com", - block_regex: /\.tinypass\.com\//, + block_regex: /(\.tinypass\.com\/|assets\.bwbx\.io\/s\d\/fence\/(plug|fortress)-client\/)/, remove_cookies_select_hold: ["bb_geo_info"] }, "Bloomberg Quint": { diff --git a/sites_updated.json b/sites_updated.json index cbc672f..12cddff 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -2,6 +2,7 @@ "Artnet": { "domain": "artnet.com", "allow_cookies": 1, + "amp_unhide": 1, "block_regex": "\\.artnet\\.com\\/paywall-ajax\\.php", "cs_code": [{ "cond": ".article-body", @@ -9,6 +10,11 @@ } ] }, + "Bloomberg": { + "domain": "bloomberg.com", + "block_regex": "(\\.tinypass\\.com\\/|assets\\.bwbx\\.io\\/s\\d\\/fence\\/(plug|fortress)-client\\/)", + "remove_cookies_select_hold": ["bb_geo_info"] + }, "Gannett Group (local USA Today)": { "domain": "###_usa_gannett", "group": [ @@ -31,7 +37,7 @@ "Internazionale.it": { "domain": "internazionale.it", "allow_cookies": 1, - "block_regex": "\\.internazionale\\.it\\/assets\\/js\\/main\\.\\d{2,}\\.js" + "block_regex": "\\.internazionale\\.it\\/assets\\/js\\/main\\.\\d{2,}\\.js" }, "The (New Orleans) Advocate": { "domain": "###_usa_theadvocate", @@ -45,6 +51,7 @@ "The Boston Globe": { "domain": "bostonglobe.com", "allow_cookies": 1, + "amp_unhide": 1, "block_regex": "(\\.blueconic\\.net\\/|meter\\.bostonglobe\\.com\\/js\\/)" }, "The Business of Fashion": {