summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-08-13 09:58:02 -0500
committerOmar Roth <omarroth@hotmail.com>2018-08-13 10:37:29 -0500
commitdc2fde6c3853f0e169e7a6f875b7818579393f21 (patch)
tree9c88d8e0c0dd6d90364243bedde9b7b39baca4a0
parent8298d61ec0ab379cb701c1db9b5429cedf02b85a (diff)
downloadinvidious-dc2fde6c3853f0e169e7a6f875b7818579393f21.tar.gz
invidious-dc2fde6c3853f0e169e7a6f875b7818579393f21.tar.bz2
invidious-dc2fde6c3853f0e169e7a6f875b7818579393f21.zip
Bump XHR timeout
-rw-r--r--src/invidious/views/watch.ecr9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index 8405eeae..f33ccee3 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -65,7 +65,7 @@ function load_comments(target) {
"/api/v1/comments/<%= video.id %>?format=html&continuation=" + continuation;
var xhr = new XMLHttpRequest();
xhr.responseType = "json";
- xhr.timeout = 10000;
+ xhr.timeout = 20000;
xhr.open("GET", url, true);
xhr.send();
@@ -88,7 +88,7 @@ function get_reddit_comments() {
var url = "/api/v1/comments/<%= video.id %>?source=reddit";
var xhr = new XMLHttpRequest();
xhr.responseType = "json";
- xhr.timeout = 10000;
+ xhr.timeout = 20000;
xhr.open("GET", url, true);
xhr.send();
@@ -127,7 +127,7 @@ function get_youtube_comments() {
var url = "/api/v1/comments/<%= video.id %>?format=html";
var xhr = new XMLHttpRequest();
xhr.responseType = "json";
- xhr.timeout = 10000;
+ xhr.timeout = 20000;
xhr.open("GET", url, true);
xhr.send();
@@ -153,6 +153,9 @@ function get_youtube_comments() {
};
xhr.ontimeout = function() {
+ comments = document.getElementById("comments");
+ comments.innerHTML =
+ '<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
get_youtube_comments();
};
}