mirror of
https://github.com/iv-org/invidious.git
synced 2024-08-30 18:23:25 +00:00
Don't show comments when commentCount is 0
This commit is contained in:
parent
25c3ee034e
commit
000cfd4834
@ -248,6 +248,7 @@ function get_youtube_comments() {
|
||||
if (xhr.readyState == 4)
|
||||
if (xhr.status == 200) {
|
||||
comments = document.getElementById("comments");
|
||||
if (xhr.response.commentCount > 0) {
|
||||
comments.innerHTML = `
|
||||
<div>
|
||||
<h3>
|
||||
@ -260,6 +261,9 @@ function get_youtube_comments() {
|
||||
contentHtml: xhr.response.contentHtml,
|
||||
commentCount: commaSeparateNumber(xhr.response.commentCount)
|
||||
});
|
||||
} else {
|
||||
comments.innerHTML = "";
|
||||
}
|
||||
} else {
|
||||
<% if preferences && preferences.comments[1] == "youtube" %>
|
||||
get_youtube_comments();
|
||||
|
Loading…
Reference in New Issue
Block a user