use correct class for quicknav
This commit is contained in:
@@ -8409,6 +8409,12 @@ body.layout-legacy .comment-content img.emoji {
|
|||||||
background: rgba(17, 17, 17, 0.55) !important;
|
background: rgba(17, 17, 17, 0.55) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.anchor-target {
|
||||||
|
border-left: 3px solid var(--accent) !important;
|
||||||
|
background: rgba(17, 17, 17, 0.55) !important;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes activityGlow {
|
@keyframes activityGlow {
|
||||||
0% {
|
0% {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
|
|||||||
@@ -3254,8 +3254,8 @@ window.cancelAnimFrame = (function () {
|
|||||||
if (targetEl) {
|
if (targetEl) {
|
||||||
targetEl.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
targetEl.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
// Clear any previous highlight, then permanently mark this element
|
// Clear any previous highlight, then permanently mark this element
|
||||||
document.querySelectorAll('.comment-highlighted').forEach(el => el.classList.remove('comment-highlighted'));
|
document.querySelectorAll('.anchor-target').forEach(el => el.classList.remove('anchor-target'));
|
||||||
targetEl.classList.add('comment-highlighted');
|
targetEl.classList.add('anchor-target');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,10 +41,10 @@
|
|||||||
if (!hash) return;
|
if (!hash) return;
|
||||||
var el = document.querySelector(hash);
|
var el = document.querySelector(hash);
|
||||||
if (!el) return;
|
if (!el) return;
|
||||||
document.querySelectorAll('.comment-highlighted').forEach(function(c) {
|
document.querySelectorAll('.anchor-target').forEach(function(c) {
|
||||||
c.classList.remove('comment-highlighted');
|
c.classList.remove('anchor-target');
|
||||||
});
|
});
|
||||||
el.classList.add('comment-highlighted');
|
el.classList.add('anchor-target');
|
||||||
}
|
}
|
||||||
|
|
||||||
function initFromHash() {
|
function initFromHash() {
|
||||||
|
|||||||
Reference in New Issue
Block a user