Discussion Show HN: HN dark mode in 2 lines of code Paste this in the developer tools console of your browserdocument.documentElement.style.filter = "invert()"document.documentElement.style.background = '#fff'Edit: you can also create a bookmark with the code below in the URL fieldjavascript: (() => { document.documentElement.style.filter = "invert()";document.documentElement.style.background = '#fff' })();Then just click on the bookmark for instant dark mode 31 points zikero 4 years ago 10 comments
document.documentElement.style.filter = "invert()"
document.documentElement.style.background = '#fff'
Edit: you can also create a bookmark with the code below in the URL field
javascript: (() => { document.documentElement.style.filter = "invert()";document.documentElement.style.background = '#fff' })();
Then just click on the bookmark for instant dark mode