mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:27 -04:00
Fix retry on timeout for AJAX requests
This commit is contained in:
parent
a3164177f8
commit
552f616305
9 changed files with 110 additions and 53 deletions
|
@ -218,7 +218,6 @@ if (!video_data.params.listen && video_data.params.annotations) {
|
|||
xhr.responseType = 'text';
|
||||
xhr.timeout = 60000;
|
||||
xhr.open('GET', '/api/v1/annotations/' + video_data.id, true);
|
||||
xhr.send();
|
||||
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
|
@ -251,6 +250,8 @@ if (!video_data.params.listen && video_data.params.annotations) {
|
|||
window.open(path, '_blank');
|
||||
}
|
||||
});
|
||||
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
// Since videojs-share can sometimes be blocked, we defer it until last
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue