Skip to content

Instantly share code, notes, and snippets.

@0xedward
Last active July 31, 2021 21:42
Show Gist options
  • Select an option

  • Save 0xedward/03c846f17e0c8fbf768c9920947e7c83 to your computer and use it in GitHub Desktop.

Select an option

Save 0xedward/03c846f17e0c8fbf768c9920947e7c83 to your computer and use it in GitHub Desktop.
Enable Dark Mode on any site

Enable Dark Mode on any site

javascript:document.querySelectorAll('html').forEach((h)=>{h.style.filter="invert(1) hue-rotate(180deg)"});document.querySelectorAll('img').forEach((i)=>{i.style.filter="invert(1) hue-rotate(180deg)"});

Setup

  1. Copy the script
  2. Create a new bookmark with script as the URL of the bookmark and save the bookmark
  3. Click the bookmark you saved earlier to turn on dark mode for the site you are currently on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment