Comment by austincheney

5 years ago

Challenge accepted: https://github.com/prettydiff/hn_dark

The CSS works well for me, but I understand presentation is highly subjective and some people may not like it.

Perhaps more important is that tiny bit of JavaScript in the readme.md so that anybody can rapidly experiment with CSS themes for Hacker News on live pages with just copy and paste.

This was my first time to do a deep dive into the front-end code of Hacker News and the HTML is archaic. If you would like I can help spruce it up to modern 2008ish HTML code that is fully semantic, accessible, and much better for SEO. Just let me know how I can help.

You don't need JavaScript to experiment with CSS. Just open DevTools and experiment away.

  • This approach, if you tried it, is just a one time copy/paste to impose an entire theme change, such as swapping CSS files.

    There isn't a cross-browser one step way to swap CSS files on live pages that I am aware of, especially if CSP is enabled as is the case with HN.