From 82e9fcbf30e18e3c6c1d581910fd8a72581b51bc Mon Sep 17 00:00:00 2001 From: Ashley <iamashley@duck.com> Date: Sat, 22 Oct 2022 17:00:30 +0200 Subject: [PATCH] Comment Improvements v2 pog --- html/poketube.ejs | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/html/poketube.ejs b/html/poketube.ejs index 6a433956..80880834 100644 --- a/html/poketube.ejs +++ b/html/poketube.ejs @@ -506,25 +506,17 @@ Top Comments :3 </p> <hr style="clear: both;display: block;border: none;border-bottom: 0.5px solid #2f2f2f;margin: 0 0;/*! width: 4.5em; */height: 0;"> - - <% if (inv != "Disabled") { %> - - <% if (!Array.isArray( inv.comments)) { %> - <p> - Comments couldnt load ;-; (<a href="https://codeberg.org/Ashley/poketube/issues/new">Report dis issue</a> or refresh the god damn page lol) - </p> - <% } %> - <% } %> - - <% if (inv == "Disabled") { %> + + + <% if (!inv.comments) { %> <p> - Comments are disabled + There was a error while parsing the comments :c <a href="/watch?v=<%= video.id %>">Refresh the page</a> or report this issue at codeberg </p> <% } %> <div class="comments"> - <% if (Array.isArray( inv.comments)) { %> + <% if (inv.comments) { %> <% inv.comments.forEach(x =>{ %> @@ -567,10 +559,10 @@ <i class="icon ion ion-md-checkmark-circle"></i> <% } %> + <% } %> </p> - <% } %> </h5> <p class="comment" style="font-weight: bold;"> @@ -592,8 +584,8 @@ <% }) %> - <% } %> - + <% } %> + </div> </div>