Skip to content

Instantly share code, notes, and snippets.

@sj26
Created January 28, 2020 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sj26/82eb0a004dfd70b2b179a06b568e9f88 to your computer and use it in GitHub Desktop.
Save sj26/82eb0a004dfd70b2b179a06b568e9f88 to your computer and use it in GitHub Desktop.
Fastmail Auto Dark Mode
// 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