Good day. Not so long ago, I suddenly realized that there were a large number of unread articles on Habré, set aside "for later", while more and more interesting articles were accumulated. It was always hard for me to read large texts from the screen, so I thought that it would be nice to print these articles.
Finding a solution
Probably, I am not an “advanced user” of Habr, but I did not find a print version. Got into Google, a quick look at the results led to the only solution described
here . This decision did not suit me somewhat (the reasons do not matter). The variant through “m. *” From the
commentary to the same post did not suit either.
Your bike
I use firefox, which is bolted to the greasemonkey plugin to "improve the interface" of a couple of sites via userscript. Therefore, to prepare the post for printing, I chose this path. Without the invention of whole plugins or other complex manipulations. In general, the main idea was the thought "This is not a business application, make it quick and print." Initially, I did not intend to make this decision public, I did not think about such things as “the beauty of the decision”.
')
However, userscript is written and that’s how it looks and what it can do:

Uncover spoilers
I decided to do this in the form of an option, because The usefulness of the information in the spoiler depends on the article itself (it can be either a sample code or additional, optional information).
Blank lines
At first, I decided to cut out all tags at all, but then I realized that this way the text completely turns into a mess of characters, therefore, I cut out only the second one of the pair, as well as after the headings and some other elements. With this approach, blank lines are removed, but the text remains readable.
Images
Here everything seems to be clear, but there is a small nuance. Due to the change in the appearance of the page, the images, if they were beautifully arranged with the alignment on the edge, begin to crawl along the text, which breaks the appearance of the page. The solution here is "in the forehead" - all the images are removed alignment and flow around the text.
Comments
Comments have also been modified. They have removed the indents, reduced the font, and so on. Cosmetic changes. Probably, someone may not like that the panel with the author's nickname and rating disappears, but I read comments without relying on this information.
And why is this all?
Yes, indeed, I originally wrote this tool on my knee for personal use. On the other hand, this solution may also be useful to someone, so why not put it in open access?
Script
repository on
githubPS
I apologize if it makes a difference, for
Bookin to use the name habraPrint, nothing else occurred to me at the time of the development.