From c9946f1e2cc32c3449e8102e2c1cf02a4ee02330 Mon Sep 17 00:00:00 2001 From: Jiahao Lee Date: Mon, 10 Jun 2024 16:31:20 +0800 Subject: [PATCH] fix(route): guokr page visibility issue (#15860) Guokr now uses `opacity: 0` to blank out the content. This little patch circumvents the issue by removing the offending inline CSS rule. --- lib/routes/guokr/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/guokr/utils.ts b/lib/routes/guokr/utils.ts index 8b0ed9d5f..7fb1a041a 100644 --- a/lib/routes/guokr/utils.ts +++ b/lib/routes/guokr/utils.ts @@ -23,7 +23,7 @@ export const parseItem = (item) => $('#meta_content').remove(); $('div').each((_, elem) => { const $elem = $(elem); - $elem.attr('style', $elem.attr('style')?.replaceAll(/display:none;|visibility: hidden;/g, '')); + $elem.attr('style', $elem.attr('style')?.replaceAll(/(?:display:\s*none|visibility:\s*hidden|opacity:\s*0);?/g, '')); }); $('img').each((_, elem) => { const $elem = $(elem);