mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Fix comment event listener
This commit is contained in:
parent
2a4b252a9d
commit
23ccaea2ff
3 changed files with 175 additions and 169 deletions
|
@ -69,6 +69,7 @@ function get_playlist(plid, retries) {
|
|||
xhr.send();
|
||||
}
|
||||
|
||||
window.addEventListener('load', function (e) {
|
||||
if (video_data.plid) {
|
||||
get_playlist(video_data.plid);
|
||||
} else if (video_data.video_series) {
|
||||
|
@ -98,3 +99,4 @@ if (video_data.plid) {
|
|||
location.assign(url.pathname + url.search);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -151,6 +151,7 @@ player.vttThumbnails({
|
|||
|
||||
// Enable annotations
|
||||
if (!video_data.params.listen && video_data.params.annotations) {
|
||||
window.addEventListener('load', function (e) {
|
||||
var video_container = document.getElementById('player');
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.responseType = 'text';
|
||||
|
@ -190,6 +191,7 @@ if (!video_data.params.listen && video_data.params.annotations) {
|
|||
});
|
||||
|
||||
xhr.send();
|
||||
});
|
||||
}
|
||||
|
||||
function increase_volume(delta) {
|
||||
|
|
|
@ -439,6 +439,7 @@ if (video_data.play_next) {
|
|||
});
|
||||
}
|
||||
|
||||
window.addEventListener('load', function (e) {
|
||||
if (video_data.plid) {
|
||||
get_playlist(video_data.plid);
|
||||
}
|
||||
|
@ -455,3 +456,4 @@ if (video_data.params.comments[0] === 'youtube') {
|
|||
comments = document.getElementById('comments');
|
||||
comments.innerHTML = '';
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue