ffff
This commit is contained in:
@@ -8351,7 +8351,7 @@ input#s_avatar {
|
||||
|
||||
.nav-user-menu a {
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
padding: 10px 10px;
|
||||
color: var(--white);
|
||||
text-decoration: none;
|
||||
transition: background 0.2s;
|
||||
@@ -8722,6 +8722,8 @@ video.autoplay-gif {
|
||||
text-align: center;
|
||||
background: var(--bg);
|
||||
border-bottom: 1px solid var(--nav-link-hover-bg);
|
||||
border-left: 1px solid var(--nav-border-color);
|
||||
border-right: 1px solid var(--nav-border-color);
|
||||
}
|
||||
|
||||
/* Markdown Styles */
|
||||
|
||||
@@ -120,6 +120,8 @@ class CommentSystem {
|
||||
if (!document.body.classList.contains('layout-legacy') && !document.body.classList.contains('legacy-view')) return;
|
||||
|
||||
const updateBtn = () => {
|
||||
if (!this.initialLoadDone) return;
|
||||
|
||||
const btn = document.querySelector('.scroll-to-bottom');
|
||||
if (!btn) return;
|
||||
|
||||
@@ -128,7 +130,9 @@ class CommentSystem {
|
||||
|
||||
const rect = container.getBoundingClientRect();
|
||||
// Detect if we are at the bottom of the comments section
|
||||
const isAtBottom = rect.bottom < window.innerHeight + 100;
|
||||
// We also require window.scrollY > 50 to prevent flickering to 'scroll to top'
|
||||
// when the page first loads and images haven't fully pushed the container down yet.
|
||||
const isAtBottom = (rect.bottom < window.innerHeight + 100) && (window.scrollY > 50);
|
||||
|
||||
if (isAtBottom) {
|
||||
btn.classList.add('is-at-bottom');
|
||||
@@ -673,6 +677,7 @@ class CommentSystem {
|
||||
this.render(comments, this.user, initialIsSubscribed);
|
||||
this.initialLoadDone = true;
|
||||
this.restoreState(state);
|
||||
if (this.scrollHandler) this.scrollHandler();
|
||||
this._loadDanmaku(comments);
|
||||
|
||||
if (scrollToId) {
|
||||
@@ -743,6 +748,7 @@ class CommentSystem {
|
||||
this.reconcile(data.comments, data.user_id, data.is_subscribed);
|
||||
this.initialLoadDone = true;
|
||||
this.restoreState(state);
|
||||
if (this.scrollHandler) this.scrollHandler();
|
||||
|
||||
if (scrollToId) {
|
||||
this.preservingScroll = false;
|
||||
@@ -772,6 +778,7 @@ class CommentSystem {
|
||||
this.render(data.comments, data.user_id, data.is_subscribed);
|
||||
this.initialLoadDone = true;
|
||||
this.restoreState(state);
|
||||
if (this.scrollHandler) this.scrollHandler();
|
||||
this._loadDanmaku(data.comments);
|
||||
|
||||
if (scrollToId) {
|
||||
|
||||
Reference in New Issue
Block a user