mirror of
				https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
				synced 2024-08-15 00:53:38 +00:00 
			
		
		
		
	Bump XHR timeout
This commit is contained in:
		
							parent
							
								
									8298d61ec0
								
							
						
					
					
						commit
						dc2fde6c38
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		|  | @ -65,7 +65,7 @@ function load_comments(target) { | ||||||
|     "/api/v1/comments/<%= video.id %>?format=html&continuation=" + continuation; |     "/api/v1/comments/<%= video.id %>?format=html&continuation=" + continuation; | ||||||
|   var xhr = new XMLHttpRequest(); |   var xhr = new XMLHttpRequest(); | ||||||
|   xhr.responseType = "json"; |   xhr.responseType = "json"; | ||||||
|   xhr.timeout = 10000; |   xhr.timeout = 20000; | ||||||
|   xhr.open("GET", url, true); |   xhr.open("GET", url, true); | ||||||
|   xhr.send(); |   xhr.send(); | ||||||
| 
 | 
 | ||||||
|  | @ -88,7 +88,7 @@ function get_reddit_comments() { | ||||||
|   var url = "/api/v1/comments/<%= video.id %>?source=reddit"; |   var url = "/api/v1/comments/<%= video.id %>?source=reddit"; | ||||||
|   var xhr = new XMLHttpRequest(); |   var xhr = new XMLHttpRequest(); | ||||||
|   xhr.responseType = "json"; |   xhr.responseType = "json"; | ||||||
|   xhr.timeout = 10000; |   xhr.timeout = 20000; | ||||||
|   xhr.open("GET", url, true); |   xhr.open("GET", url, true); | ||||||
|   xhr.send(); |   xhr.send(); | ||||||
| 
 | 
 | ||||||
|  | @ -127,7 +127,7 @@ function get_youtube_comments() { | ||||||
|   var url = "/api/v1/comments/<%= video.id %>?format=html"; |   var url = "/api/v1/comments/<%= video.id %>?format=html"; | ||||||
|   var xhr = new XMLHttpRequest(); |   var xhr = new XMLHttpRequest(); | ||||||
|   xhr.responseType = "json"; |   xhr.responseType = "json"; | ||||||
|   xhr.timeout = 10000; |   xhr.timeout = 20000; | ||||||
|   xhr.open("GET", url, true); |   xhr.open("GET", url, true); | ||||||
|   xhr.send(); |   xhr.send(); | ||||||
| 
 | 
 | ||||||
|  | @ -153,6 +153,9 @@ function get_youtube_comments() { | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   xhr.ontimeout = function() { |   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(); |     get_youtube_comments(); | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue