1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-17 16:55:31 -04:00

IE11 compat fixes 🙄 (closes #94)

This commit is contained in:
2020-04-26 09:48:12 -04:00
parent 736cc775e3
commit 3200509ffd
2 changed files with 3 additions and 2 deletions

View File

@@ -37,8 +37,8 @@ if (!pref) {
// real-time switching if supported by OS/browser
// TODO: stop listening when the parent condition becomes false,
// right now these keep listening even if pref is set.
window.matchMedia('(prefers-color-scheme: dark)').addListener(e => e.matches && activateDarkMode());
window.matchMedia('(prefers-color-scheme: light)').addListener(e => e.matches && activateLightMode());
window.matchMedia('(prefers-color-scheme: dark)').addListener(function(e) { if (e.matches) activateDarkMode(); });
window.matchMedia('(prefers-color-scheme: light)').addListener(function(e) { if (e.matches) activateLightMode(); });
}
// handle lightbulb click