Created
January 28, 2020 12:22
-
-
Save sj26/82eb0a004dfd70b2b179a06b568e9f88 to your computer and use it in GitHub Desktop.
Fastmail Auto Dark Mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I don't know how to inject this on load yet, but pasting this in a console makes the Fastmail theme change between light and dark when macOS is toggled between light and dark. | |
window.matchMedia("(prefers-color-scheme: dark)").addListener(function(query) { | |
var theme = query.matches ? "dark" : "minimal"; | |
FastMail.theme.set("theme", theme); | |
FastMail.userPrefs.set("theme", theme); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment