making settings more readable and navigatable

This commit is contained in:
2026-05-23 20:10:57 +02:00
parent c6ff4fa703
commit 0f3b80f0c1
9 changed files with 148 additions and 112 deletions

View File

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

View File

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