From 1a82be68d47698e37b3db5f7422620776926a321 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 12 Apr 2024 08:01:22 +0200 Subject: [PATCH] Fix BizJournals (css) --- changelog.txt | 1 + contentScript.js | 27 +++++++++++++++++++++++++++ sites.js | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 3fbea6d..d82f720 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal Post-release Add OVB Media (opt-in to custom sites for unlisted) Add Private Media AU +Fix BizJournals (css) Fix The Economist (regwall) Fix WaPo (js) Update custom sites (block_regex_ignore_default) diff --git a/contentScript.js b/contentScript.js index 0a0461d..e308732 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3862,6 +3862,33 @@ else if (matchDomain('billboard.com')) { } } +else if (matchDomain('bizjournals.com')) { + let paywall = document.querySelector('div[data-dev="CxWidget_article:wall"]'); + if (paywall) { + removeDOMElement(paywall); + let hidden_content = document.querySelector('article div[style="display: none;"]'); + if (hidden_content) + hidden_content.removeAttribute('style'); + } else { + let paywall = document.querySelector('div#cxense-paywall'); + if (paywall) { + removeDOMElement(paywall); + let paywalled_content = document.querySelectorAll('.paywalled-content[style]'); + for (let elem of paywalled_content) + elem.removeAttribute('style'); + } + } + let dialog = document.querySelector('div[id^="headlessui-dialog-"]'); + if (dialog) { + removeDOMElement(dialog); + let body = document.querySelector('body'); + if (body) + body.click(); + } + let ads = 'div.adwrap'; + hideDOMStyle(ads); +} + else if (matchDomain('bloomberg.com')) { let paywall_sel = 'div[id^="fortress-"]'; let paywall = paywall_sel; diff --git a/sites.js b/sites.js index 117cace..f91161f 100644 --- a/sites.js +++ b/sites.js @@ -2439,7 +2439,7 @@ var defaultSites = { }, "The Business Journals (free articles only; do not block Cxense-script externally)": { domain: "bizjournals.com", - block_regex: /cdn\.cxense\.com\/cx\.js/ + allow_cookies: 1 }, "The Business of Fashion": { domain: "businessoffashion.com",