mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:27 -04:00
Fix comment event listener
This commit is contained in:
parent
2a4b252a9d
commit
23ccaea2ff
3 changed files with 175 additions and 169 deletions
|
@ -439,19 +439,21 @@ if (video_data.play_next) {
|
|||
});
|
||||
}
|
||||
|
||||
if (video_data.plid) {
|
||||
get_playlist(video_data.plid);
|
||||
}
|
||||
window.addEventListener('load', function (e) {
|
||||
if (video_data.plid) {
|
||||
get_playlist(video_data.plid);
|
||||
}
|
||||
|
||||
if (video_data.params.comments[0] === 'youtube') {
|
||||
get_youtube_comments();
|
||||
} else if (video_data.params.comments[0] === 'reddit') {
|
||||
get_reddit_comments();
|
||||
} else if (video_data.params.comments[1] === 'youtube') {
|
||||
get_youtube_comments();
|
||||
} else if (video_data.params.comments[1] === 'reddit') {
|
||||
get_reddit_comments();
|
||||
} else {
|
||||
comments = document.getElementById('comments');
|
||||
comments.innerHTML = '';
|
||||
}
|
||||
if (video_data.params.comments[0] === 'youtube') {
|
||||
get_youtube_comments();
|
||||
} else if (video_data.params.comments[0] === 'reddit') {
|
||||
get_reddit_comments();
|
||||
} else if (video_data.params.comments[1] === 'youtube') {
|
||||
get_youtube_comments();
|
||||
} else if (video_data.params.comments[1] === 'reddit') {
|
||||
get_reddit_comments();
|
||||
} else {
|
||||
comments = document.getElementById('comments');
|
||||
comments.innerHTML = '';
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue