diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-06-15 10:08:06 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-06-15 10:09:32 -0500 |
| commit | 552f616305809d111f7540cbea93f89fad3d0760 (patch) | |
| tree | d078614fb388923ab347c05491de4e34ae10d3f6 /assets/js/themes.js | |
| parent | a3164177f8e7e3d323006e08755230f850a5fdd9 (diff) | |
| download | invidious-552f616305809d111f7540cbea93f89fad3d0760.tar.gz invidious-552f616305809d111f7540cbea93f89fad3d0760.tar.bz2 invidious-552f616305809d111f7540cbea93f89fad3d0760.zip | |
Fix retry on timeout for AJAX requests
Diffstat (limited to 'assets/js/themes.js')
| -rw-r--r-- | assets/js/themes.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/js/themes.js b/assets/js/themes.js index 178ff112..826c6597 100644 --- a/assets/js/themes.js +++ b/assets/js/themes.js @@ -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) { |
