mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-12 01:04:40 -05:00
Fix comment event listener
This commit is contained in:
parent
2a4b252a9d
commit
23ccaea2ff
@ -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 New Issue
Block a user