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.
This commit is contained in:
Jiahao Lee 2024-06-10 16:31:20 +08:00 committed by GitHub
parent a6651277ff
commit c9946f1e2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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);