mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Don't show comments when commentCount is 0
This commit is contained in:
parent
25c3ee034e
commit
000cfd4834
1 changed files with 16 additions and 12 deletions
|
@ -248,6 +248,7 @@ function get_youtube_comments() {
|
||||||
if (xhr.readyState == 4)
|
if (xhr.readyState == 4)
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
comments = document.getElementById("comments");
|
comments = document.getElementById("comments");
|
||||||
|
if (xhr.response.commentCount > 0) {
|
||||||
comments.innerHTML = `
|
comments.innerHTML = `
|
||||||
<div>
|
<div>
|
||||||
<h3>
|
<h3>
|
||||||
|
@ -260,6 +261,9 @@ function get_youtube_comments() {
|
||||||
contentHtml: xhr.response.contentHtml,
|
contentHtml: xhr.response.contentHtml,
|
||||||
commentCount: commaSeparateNumber(xhr.response.commentCount)
|
commentCount: commaSeparateNumber(xhr.response.commentCount)
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
comments.innerHTML = "";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
<% if preferences && preferences.comments[1] == "youtube" %>
|
<% if preferences && preferences.comments[1] == "youtube" %>
|
||||||
get_youtube_comments();
|
get_youtube_comments();
|
||||||
|
|
Loading…
Reference in a new issue