mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:26 -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
|
@ -9,10 +9,11 @@ toggle_theme.addEventListener('click', function () {
|
|||
xhr.responseType = 'json';
|
||||
xhr.timeout = 20000;
|
||||
xhr.open('GET', url, true);
|
||||
xhr.send();
|
||||
|
||||
set_mode(dark_mode);
|
||||
localStorage.setItem('dark_mode', dark_mode);
|
||||
|
||||
xhr.send();
|
||||
});
|
||||
|
||||
window.addEventListener('storage', function (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue