making settings more readable and navigatable
This commit is contained in:
@@ -3223,9 +3223,9 @@ window.cancelAnimFrame = (function () {
|
||||
const targetEl = document.querySelector(hash);
|
||||
if (targetEl) {
|
||||
targetEl.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
// Clear any previous highlight, then permanently mark this element
|
||||
document.querySelectorAll('.comment-highlighted').forEach(el => el.classList.remove('comment-highlighted'));
|
||||
targetEl.classList.add('comment-highlighted');
|
||||
// Remove highlight after some time to keep UI clean
|
||||
setTimeout(() => targetEl.classList.remove('comment-highlighted'), 3000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -711,9 +711,12 @@
|
||||
const id = contextLink.dataset.id;
|
||||
const target = commentsList.querySelector(`.comment-item[data-comment-id="${id}"]`);
|
||||
if (target) {
|
||||
// Clear any previous persistent highlight
|
||||
commentsList.querySelectorAll('.comment-linked').forEach(el => el.classList.remove('comment-linked'));
|
||||
target.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
target.classList.add('highlight-comment');
|
||||
setTimeout(() => target.classList.remove('highlight-comment'), 2000);
|
||||
// Flash the animation for attention, then keep the persistent highlight
|
||||
target.classList.add('highlight-comment', 'comment-linked');
|
||||
setTimeout(() => target.classList.remove('highlight-comment'), 2500);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user