diff options
| author | meow <woem> | 2022-04-20 14:57:14 +0300 |
|---|---|---|
| committer | meow <woem> | 2022-04-25 12:54:31 +0300 |
| commit | 026ea52445cca3c7f86e6cefa9899f58a13758a7 (patch) | |
| tree | 440b79772a05f304f96c0a8fb658cb14fe368e88 /assets | |
| parent | 1e60b9a3224c5b9b5d5f1a48af5abc839fd5c1b9 (diff) | |
| download | invidious-026ea52445cca3c7f86e6cefa9899f58a13758a7.tar.gz invidious-026ea52445cca3c7f86e6cefa9899f58a13758a7.tar.bz2 invidious-026ea52445cca3c7f86e6cefa9899f58a13758a7.zip | |
optional catchng is not supported by IE11
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/player.js | 2 | ||||
| -rw-r--r-- | assets/js/themes.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/assets/js/player.js b/assets/js/player.js index 4a12e95c..3c8cf219 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -466,7 +466,7 @@ function get_video_time() { return timestamp || 0; } - catch { + catch (e) { return 0; } } diff --git a/assets/js/themes.js b/assets/js/themes.js index 4dabcfc0..290b538b 100644 --- a/assets/js/themes.js +++ b/assets/js/themes.js @@ -14,7 +14,7 @@ toggle_theme.addEventListener('click', function () { set_mode(dark_mode); try { window.localStorage.setItem('dark_mode', dark_mode ? 'dark' : 'light'); - } catch {} + } catch (e) {} xhr.send(); }); @@ -30,7 +30,7 @@ window.addEventListener('DOMContentLoaded', function () { try { // Update localStorage if dark mode preference changed on preferences page window.localStorage.setItem('dark_mode', dark_mode); - } catch {} + } catch (e) {} update_mode(dark_mode); }); @@ -47,7 +47,7 @@ function scheme_switch (e) { if (localStorage.getItem('dark_mode')) { return; } - } catch {} + } catch (exception) {} if (e.matches) { if (e.media.includes('dark')) { set_mode(true); |
