From a0dcaafc110c1b0ad62c5d9fe70417b90d274dbb Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 31 Jul 2022 10:43:57 +0200 Subject: [PATCH] Fix TownNews sites (css) --- changelog.txt | 1 + contentScript.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index d67b424b..49d80c65 100644 --- a/changelog.txt +++ b/changelog.txt @@ -12,6 +12,7 @@ Fix Bloomberg (graphics) Fix Law.com (cookies) Fix LesEchos.fr (timing) Fix McClatchy Group (identify site) +Fix TownNews sites (css) Fix Winnipeg Free Press (xhr) * v2.7.7.0 (2022-07-24) diff --git a/contentScript.js b/contentScript.js index 01847228..8493a07a 100644 --- a/contentScript.js +++ b/contentScript.js @@ -4101,12 +4101,16 @@ else if (matchDomain('wsj.com')) { } } -else if (matchDomain(usa_lee_ent_domains) || (window.location.pathname.endsWith('.amp.html') && document.querySelector('div.site-copyright>p> a[href^="https://bloxcms.com"]'))) { +else if ((domain = matchDomain(usa_lee_ent_domains)) || document.querySelector('a[href^="https://bloxcms.com"][title^="BLOX"]')) { if (window.location.pathname.endsWith('.amp.html')) { - amp_unhide_access_hide('="hasAccess"', '="NOT hasAccess"'); + amp_unhide_access_hide('="hasAccess"', '="NOT hasAccess"', 'amp-ad, amp-embed, .amp-ads-container'); let elem_hidden = document.querySelectorAll('html[class], body[class]'); for (let elem of elem_hidden) elem.removeAttribute('class'); + } else if (!domain) { + let subscriber_only = document.querySelectorAll('div.subscriber-only[style]:not(.encrypted-content)'); + for (let elem of subscriber_only) + elem.removeAttribute('style'); } }