From aa96d4469e8665310813c4e3068509064112dafb Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 28 Feb 2023 18:16:44 +0100 Subject: [PATCH] Add Bloomberg Adria --- README.md | 1 + background.js | 1 + changelog.txt | 1 + contentScript.js | 10 ++++++++++ custom/manifest.json | 2 +- custom/sites_custom.json | 5 +++++ manifest.json | 3 ++- sites.js | 5 +++++ sites_updated.json | 6 ++++++ 9 files changed, 32 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9271f8b..8acab23 100644 --- a/README.md +++ b/README.md @@ -389,6 +389,7 @@ Grouped in options:\ #### Europe +[Bloomberg Adria](https://www.bloombergadria.com) - [EUobserver](https://euobserver.com) ##### United Kingdom/Ireland diff --git a/background.js b/background.js index 207d25e..fe120e5 100644 --- a/background.js +++ b/background.js @@ -19,6 +19,7 @@ var blocked_referer = false; var restrictions = { 'bloomberg.com': /^((?!\.bloomberg\.com\/news\/terminal\/).)*$/, + 'bloombergadria.com': /^((?!\.bloombergadria\.com\/video\/).)*$/, 'dailywire.com': /^((?!\.dailywire\.com\/(episode|show|videos|watch)).)*$/, 'economictimes.com': /\.economictimes\.com($|\/($|(__assets|prime)(\/.+)?|.+\.cms))/, 'elespanol.com': /^((?!\/cronicaglobal\.elespanol\.com\/).)*$/, diff --git a/changelog.txt b/changelog.txt index 763d50c..c2a855a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases Post-release +Add Bloomberg Adria Add DN.no (cached articles only) Fix mobile user-agent for Google webcache diff --git a/contentScript.js b/contentScript.js index 67448e8..38918c9 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3004,6 +3004,14 @@ else if (matchDomain('bloomberg.com')) { } } +else if (matchDomain('bloombergadria.com')) { + let article_hidden = document.querySelector('article[style]'); + if (article_hidden) + article_hidden.removeAttribute('style'); + let ads = document.querySelectorAll('.banner'); + removeDOMElement(...ads); +} + else if (matchDomain('bostonglobe.com')) { if (window.location.search.startsWith('?outputType=amp')) { amp_unhide_subscr_section(); @@ -4899,6 +4907,8 @@ function ext_12ftLink(url, text_fail = 'BPC > Full article text:\r\n') { } function externalLink(domains, ext_url_templ, url, text_fail = 'BPC > Full article text:\r\n') { + if (domains.includes('search.google.com')) + text_fail = 'BPC > Full article text (copy html (tab) code to online html viewer):\r\n' let text_fail_div = document.createElement('div'); text_fail_div.id = 'bpc_archive'; text_fail_div.setAttribute('style', 'margin: 20px; font-weight: bold; color:red;'); diff --git a/custom/manifest.json b/custom/manifest.json index 7e2fdce..1c221b3 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.0.7.1" + "version": "3.0.7.2" } diff --git a/custom/sites_custom.json b/custom/sites_custom.json index d517b34..2f50b2c 100644 --- a/custom/sites_custom.json +++ b/custom/sites_custom.json @@ -469,5 +469,10 @@ "allow_cookies": 1, "block_regex": "\\.tinypass\\.com", "domain": "washingtontimes.com" + }, + "Wuv.de": { + "allow_cookies": 1, + "domain": "wuv.de", + "ld_google_webcache": "div.paid-article|div.font-serif" } } diff --git a/manifest.json b/manifest.json index 87b6567..737768f 100644 --- a/manifest.json +++ b/manifest.json @@ -110,6 +110,7 @@ "*://*.billboard.com/*", "*://*.bizjournals.com/*", "*://*.bloomberg.com/*", + "*://*.bloombergadria.com/*", "*://*.bnd.com/*", "*://*.bndestem.nl/*", "*://*.bnn.de/*", @@ -744,5 +745,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.0.7.1" + "version": "3.0.7.2" } diff --git a/sites.js b/sites.js index 0d2bdac..42c6dd6 100644 --- a/sites.js +++ b/sites.js @@ -233,6 +233,11 @@ var defaultSites = { block_regex: /(\.tinypass\.com\/|assets\.bwbx\.io\/s\d\/(fence\/plug-client|javelin\/.+\/transporter)\/)/, remove_cookies_select_drop: ["gatehouse_id"] }, + "Bloomberg Adria": { + domain: "bloombergadria.com", + allow_cookies: 1, + block_js_inline: /\.bloombergadria\.com\/.+\/news\// + }, "BQ Prime": { domain: "bqprime.com", allow_cookies: 1, diff --git a/sites_updated.json b/sites_updated.json index abd0d2a..c7f79e9 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -1,4 +1,10 @@ { + "Bloomberg Adria": { + "domain": "bloombergadria.com", + "allow_cookies": 1, + "block_js_inline": "\\.bloombergadria\\.com\\/.+\\/news\\/", + "cs_code": "[{\"cond\":\"article[style]\",\"rm_attrib\":\"style\"}]" + }, "DH Les Sports+": { "domain": "dhnet.be", "allow_cookies": 1,