mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 14:36:23 -04:00
Shorten timeout for AJAX
This commit is contained in:
parent
458e9d6cc7
commit
17edfd6573
8 changed files with 19 additions and 25 deletions
|
@ -17,7 +17,7 @@ function subscribe(retries = 5) {
|
|||
'&c=' + subscribe_data.ucid;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType = 'json';
|
||||
xhr.timeout = 20000;
|
||||
xhr.timeout = 10000;
|
||||
xhr.open('POST', url, true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
|
||||
|
@ -57,7 +57,7 @@ function unsubscribe(retries = 5) {
|
|||
'&c=' + subscribe_data.ucid;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType = 'json';
|
||||
xhr.timeout = 20000;
|
||||
xhr.timeout = 10000;
|
||||
xhr.open('POST', url, true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue