Skip to content

Commit 026ea52

Browse files
author
meow
committed
optional catchng is not supported by IE11
1 parent 1e60b9a commit 026ea52

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

assets/js/player.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ function get_video_time() {
466466

467467
return timestamp || 0;
468468
}
469-
catch {
469+
catch (e) {
470470
return 0;
471471
}
472472
}

assets/js/themes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ toggle_theme.addEventListener('click', function () {
1414
set_mode(dark_mode);
1515
try {
1616
window.localStorage.setItem('dark_mode', dark_mode ? 'dark' : 'light');
17-
} catch {}
17+
} catch (e) {}
1818

1919
xhr.send();
2020
});
@@ -30,7 +30,7 @@ window.addEventListener('DOMContentLoaded', function () {
3030
try {
3131
// Update localStorage if dark mode preference changed on preferences page
3232
window.localStorage.setItem('dark_mode', dark_mode);
33-
} catch {}
33+
} catch (e) {}
3434
update_mode(dark_mode);
3535
});
3636

@@ -47,7 +47,7 @@ function scheme_switch (e) {
4747
if (localStorage.getItem('dark_mode')) {
4848
return;
4949
}
50-
} catch {}
50+
} catch (exception) {}
5151
if (e.matches) {
5252
if (e.media.includes('dark')) {
5353
set_mode(true);

0 commit comments

Comments
 (0)