fix: resolve #5888 - [Bug] Custom emojis are broken

This commit is contained in:
Taher Ezzi 2026-09-09 14:04:18 +00:00
parent 049d591d29
commit e709b4bca6
2 changed files with 5 additions and 11 deletions

View File

@ -83,7 +83,6 @@ function get_youtube_comments() {
} else { } else {
comments.innerHTML = fallback; comments.innerHTML = fallback;
} }
}; };
if (video_data.params.comments[1] === 'youtube') if (video_data.params.comments[1] === 'youtube')
@ -113,10 +112,6 @@ function get_youtube_comments() {
contentHtml: response.contentHtml, contentHtml: response.contentHtml,
redditComments: video_data.reddit_comments_text, redditComments: video_data.reddit_comments_text,
commentsText: video_data.comments_text.supplant({ commentsText: video_data.comments_text.supplant({
// toLocaleString correctly splits number with local thousands separator. e.g.:
// '1,234,567.89' for user with English locale
// '1 234 567,89' for user with Russian locale
// '1.234.567,89' for user with Portuguese locale
commentCount: response.commentCount.toLocaleString() commentCount: response.commentCount.toLocaleString()
}) })
}); });
@ -126,7 +121,7 @@ function get_youtube_comments() {
comments.children[0].children[1].children[0].onclick = swap_comments; comments.children[0].children[1].children[0].onclick = swap_comments;
} }
}, },
onNon200: onNon200, // declared above onNon200: onNon200,
onError: function (xhr) { onError: function (xhr) {
comments.innerHTML = spinnerHTML; comments.innerHTML = spinnerHTML;
}, },
@ -184,7 +179,6 @@ function get_youtube_replies(target, load_more, load_replies) {
body.innerHTML = fallback; body.innerHTML = fallback;
}, },
onTimeout: function (xhr) { onTimeout: function (xhr) {
console.warn('Pulling comments failed');
body.innerHTML = fallback; body.innerHTML = fallback;
} }
}); });

View File

@ -25,10 +25,10 @@ function show_youtube_replies(event) {
var body = target.parentNode.parentNode.children[1]; var body = target.parentNode.parentNode.children[1];
body.style.display = ''; body.style.display = '';
target.innerHTML = sub_text; target.innerHTML = inner_text;
target.onclick = hide_youtube_replies; target.onclick = hide_youtube_replies;
target.setAttribute('data-inner-text', inner_text); target.setAttribute('data-inner-text', sub_text);
target.setAttribute('data-sub-text', sub_text); target.setAttribute('data-sub-text', inner_text);
} }
function get_youtube_replies(target, load_more) { function get_youtube_replies(target, load_more) {