mirror of
https://github.com/afoim/fuwari.git
synced 2026-01-31 09:03:18 +08:00
fix: 让直达评论区按钮始终显示
This commit is contained in:
@@ -534,7 +534,7 @@ function scrollFunction() {
|
||||
if (goToCommentsBtn) {
|
||||
// Only show if comments exist and scrolled down
|
||||
const commentsExist = !!document.getElementById('giscus-container');
|
||||
if (commentsExist && (document.body.scrollTop > bannerHeight || document.documentElement.scrollTop > bannerHeight)) {
|
||||
if (commentsExist) {
|
||||
goToCommentsBtn.classList.remove('hide')
|
||||
} else {
|
||||
goToCommentsBtn.classList.add('hide')
|
||||
|
||||
Reference in New Issue
Block a user