3 ms·
custom CSS is the way. I don't believe HN will ever adopt dark mode. But the site is so stripped down it's easy to write custom dark mode for it.
by QQ00 6mo ago
custom CSS is the way. I don't believe HN will ever adopt dark mode. But the site is so stripped down it's easy to write custom dark mode for it.
- latchkey 6mo agohttps://github.com/OrangeJuiceExtension/OrangeJuice/blob/b84366d8d31059b579a84389da53340205fb064c/src/utils/dark-mode.css https://github.com/OrangeJuiceExtension/OrangeJuice/blob/b84...
- vunderba 6mo agoStylus is great for this kind of thing - it's basically Tampermonkey but for site-level CSS overrides. https://addons.mozilla.org/en-US/firefox/addon/styl-us/ https://addons.mozilla.org/en-US/firefox/addon/styl-us/
- jasomill 6mo agoThanks for this! I've been using it for less than a minute, and it has already exceeded my expectations: Installed, opened the raw view in the GitHub link to the dark mode style linked to above to copy it into the clipboard, and was pleasently surprised that it opened in the extension with syntax highlighting and a button to install. Clicked "Install", back back to HN, reload, dark mode.
- vunderba 6mo agoCheers! I feel like the vast majority of extensions could be rewritten as either TamperMonkey or Stylus scripts. I’m always leery of installing new extensions (nothing against Orange Juice) because of all the high-profile cases where they get bought out by unscrupulous companies and basically turn into malware payload delivery systems. It’s nice to be able to reduce the attack surface down to just these two extensions, which have been around for a long time.
- jasomill 6mo agoI agree, though I use Violentmonkey instead of Tampermonkey because open source, and uBlock Origin because rewriting it as a *monkey script is somewhere between "Implement a MIDI Machine Control interface to my turntable" and "Rewrite FreeBSD in Rust" on my project list.
- vunderba 6mo agoHaha yeah - same I only run three extensions (uBlock Origin, Stylus, and Tampermonkey) but I'll be swapping over to violentmonkey [1]. Thanks for the recommendation - didn't realize there was a FOSS equivalent. https://github.com/violentmonkey/violentmonkey https://github.com/violentmonkey/violentmonkey
- jasomill 6mo agoSide note: enable the Stylus "Instant inject mode" option to prevent light mode HN from briefly flashing when loading or changing pages.