Add error message when comments are disabled

This commit is contained in:
syeopite 2023-08-08 21:49:06 -07:00
parent b173d4acf2
commit d0fecd2bc0
No known key found for this signature in database
GPG key ID: A73C186DA3955A1A
7 changed files with 52 additions and 11 deletions

View file

@ -53,6 +53,10 @@ function show_youtube_replies(event) {
}
function get_youtube_comments() {
if (!video_data.comments_enabled) {
return;
};
var comments = document.getElementById('comments');
var fallback = comments.innerHTML;

View file

@ -186,8 +186,5 @@ addEventListener('load', function (e) {
get_youtube_comments();
} else if (video_data.params.comments[1] === 'reddit') {
get_reddit_comments();
} else {
var comments = document.getElementById('comments');
comments.innerHTML = '';
}
}
});