mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-14 09:05:09 +00:00
Add error message when comments are disabled
This commit is contained in:
@@ -816,3 +816,7 @@ h1, h2, h3, h4, h5, p,
|
||||
#download_widget {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#comments-turned-off-on-video-message > p, #comments-disabled-message > p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user