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 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!)

Аўтар
Alistair1231
Усталяванняў за дзень
0
Усяго ўсталяванняў
15
Рэйтынг
0 0 0
Версія
0.3.0
Створаны
16.03.2025
Абноўлены
30.06.2025
Памер
3.4 КБ
Ліцэнзія
GPL-3.0
Ужываецца на
Усе сайты

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: