Show HN: I made a browser extension that fixes Hacker News' block formatting
github.com
github.com
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
My “solution” is to add asterisks around the text to make it Italic, like so:> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Here are the official formatting guidelines: https://news.ycombinator.com/formatdoc
> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lines starting with four spaces are for code, not for quotations. In that situation you usually really do want a horizontal scroll bar rather than line wrapping, and this breaks that for actual code. That's also why it uses a fixed width font, which makes no sense at all for quotations.
Hacker News is deliberately very light on formatting, and I prefer it that way. The only thing that needs fixing is a bit of user education not to misuse the block formatting feature. Maybe there should be a list of formatting options below the reply box, with the idea of just sticking a text annotation on quotations mentioned explicitly. (A comment preview would also be nice, mostly so you could read your comment back in a proportional-width font before you post it.)
The official policy says:
https://news.ycombinator.com/formatdoc
> This is intended for code.
As a bonus, you can fix the ‘[-]’ comment collapse link by making it five times wider. And crank up the font size.
The primary annoyance with this approach is that you can't look up the tag hierarchy and classes on a phone, at least I haven't found an extension that would let me do it even on the desktop (even though I think I've seen some, years ago).
https://addons.mozilla.org/en-US/firefox/addon/violentmonkey...
I'm not really sure if Firefox addons/extensions work well in iOS. I can imagine a few reasons it might be more limited, but I don't have an iPhone to test.
It's written in Arc (a dialect of Lisp) and included in the Arc distribution: