fdsfdsa
This commit is contained in:
@@ -9268,12 +9268,12 @@ body.layout-legacy .comment-content img.emoji {
|
||||
}
|
||||
|
||||
.comment-highlighted {
|
||||
border-left: 3px solid var(--accent) !important;
|
||||
box-shadow: inset 3px 0px 0px var(--accent) !important;
|
||||
background: var(--bg) !important;
|
||||
}
|
||||
|
||||
.anchor-target {
|
||||
border-left: 3px solid var(--accent) !important;
|
||||
box-shadow: inset 3px 0px 0px var(--accent) !important;
|
||||
background: rgba(17, 17, 17, 0.55) !important;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
@@ -1022,6 +1022,25 @@ class CommentSystem {
|
||||
document.body.appendChild(preview);
|
||||
CommentSystem.playEmojiVideos(preview);
|
||||
|
||||
// If the emoji cache isn't ready yet but this preview contains :emoji: shortcodes,
|
||||
// trigger a load and re-render just the preview's content once the cache arrives.
|
||||
const previewContentEl = preview.querySelector('.comment-content');
|
||||
if (previewContentEl && !CommentSystem.emojiCache && /:([a-z0-9_]+):/.test(previewContentEl.textContent)) {
|
||||
const rerender = () => {
|
||||
if (!document.body.contains(preview)) return;
|
||||
const raw = previewContentEl.dataset.raw;
|
||||
if (raw) {
|
||||
previewContentEl.innerHTML = this.renderCommentContent(raw);
|
||||
CommentSystem.playEmojiVideos(previewContentEl);
|
||||
}
|
||||
};
|
||||
if (!CommentSystem.loadingEmojis) {
|
||||
this.loadEmojis(true).then(rerender);
|
||||
} else {
|
||||
window.addEventListener('f0ck:emojis_ready', rerender, { once: true });
|
||||
}
|
||||
}
|
||||
|
||||
const previewRect = preview.getBoundingClientRect();
|
||||
|
||||
// Boundary checks
|
||||
|
||||
Reference in New Issue
Block a user