Useful bit of code I keep handy in my devtools buffer:

```
document.body.parentElement.style.filter = "invert()"
```

This will apply a color inversion filter on an entire page so that you can force a dark mode on sites that don't ssupport it. (e.g. Google's suite)

Follow

@makeworld Oh yeah good point.

For anyone curious here's an article about how bookmarklets work and an example of how to turn that script into one:

freecodecamp.org/news/what-are

```
javascript:(()=>document.body.parentElement.style.filter="invert()")()
```

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.