Dark Mode Toggle

dark mode using inversion, double-hit Esc for toggle button

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Forfatter
Alistair1231
Daglige installasjoner
0
Totale installasjoner
14
Vurderinger
0 0 0
Versjon
0.3.0
Lagd
16.03.2025
Oppdatert
30.06.2025
Size
3,4 kB
Lisens
GPL-3.0
Gjelder
Alle sider

Dark Mode Toggle

I got frustrated with how complex and unreliable existing dark mode methods were, so I made a very simple one myself. It simply inverts the colors of the page, while keeping images and videos the same.

Double-Hit Esc to shortly display the toggle button. Dark Mode state is saved in window.localStorage.darkMode for persistence.

Style loads very early to avoid white flash.

Button:

Before:

After: