From 317c8f5e6ef585376130e2d0edd0d041a98ffbbf Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 3 Dec 2022 08:09:04 +0100 Subject: [PATCH] Fix The Chronicle of Higher Education (css) --- changelog.txt | 1 + contentScript.js | 10 +++++++--- manifest.json | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 6436d63c..aaacfe23 100644 --- a/changelog.txt +++ b/changelog.txt @@ -9,6 +9,7 @@ Remove BusinessPost.ie (fix obsolete) Remove Philonomist (fix obsolete) Fix Australian Community Media (identify on url) Fix Groupe Centre France (text) +Fix The Chronicle of Higher Education (css) * v2.9.5.0 (2022-11-27) Add Haaretz.co.il & The Marker diff --git a/contentScript.js b/contentScript.js index 49f5fc51..c55666b2 100644 --- a/contentScript.js +++ b/contentScript.js @@ -2800,10 +2800,14 @@ else if (matchDomain('cen.acs.org')) { else if (matchDomain(['chronicle.com', 'philanthropy.com'])) { let preview = document.querySelector('div[data-content-summary]'); removeDOMElement(preview); - let article_hidden = document.querySelector('div.contentBody'); + let article_hidden = document.querySelector('div.contentBody[hidden]'); if (article_hidden) { - article_hidden.removeAttribute('data-content-body'); - article_hidden.removeAttribute('hidden'); + let attributes = article_hidden.attributes; + for (let elem of attributes) { + let name = elem.name; + if (name !== 'class') + article_hidden.removeAttribute(name); + } } } diff --git a/manifest.json b/manifest.json index d2d43852..080521a7 100644 --- a/manifest.json +++ b/manifest.json @@ -732,5 +732,5 @@ "*://gcm.omerlocdn.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.9.5.5" + "version": "2.9.5.6" }