Фиксы

This commit is contained in:
2025-08-19 13:13:33 +03:00
parent bc790b6d10
commit 18cbf4ea07
2 changed files with 11 additions and 10 deletions

View File

@ -456,14 +456,15 @@ async function fixEmotesPadding($messageElement, $parentElement, details, functi
let $contentElement = $messageElement.find('content').eq(0);
$contentElement.find('.emote').each(function () {
let previousSibling = this.previousSibling.nodeValue;
let nextSibling = this.nextSibling.nodeValue;
let $emote = $(this).eq(0);
let $previousEmote = $emote.prev('span.emote').eq(0);
let $nextEmote = $emote.next('span.emote').eq(0);
if (previousSibling && previousSibling.trim() === '') {
if ($previousEmote.length) {
this.classList.add('emote-left');
};
if (nextSibling && nextSibling.trim() === '') {
if ($nextEmote.length) {
this.classList.add('emote-right');
};
});