📜 ⬆️ ⬇️

The script collapsing comments on Habré

Good day to all. I’m talking about comments on articles and their long and deep threads of discussion with which they are often filled. I don’t know how other community members treat them, but my brain often begins to melt due to the volume of correspondence between participants and the inability to somehow reduce this flow of information.

That's why a small user script was written, adding two simple features:
1. Ability to collapse-expand branches of discussions;
2. When you open the page, all comments above the third level will be automatically collapsed, except for those branches where you have unread messages, as well as when you go to a specific comment in the article through a link to it.

An example of a new comment header, the answers to which were collapsed:

')
Thus, we automatically filter out deep threads of discussions, which greatly facilitates a cursory analysis of comments, but, if desired, we can quickly deploy one of the branches and read the other comments if the topic was interesting.

Script screencast



Install the script and see the source code here:
greasyfork.org/en/scripts/6744-habrahabr-collapsible-comments

To install the script, you need to have a small browser plugin:
For Google Chrome, you will need to install the Tampermonkey extension.
For Firefox, as I know - Greasemonkey .

PS In general, if I'm just not in the subject about something from the main functionality of the habrabra that facilitates reading a large number of comments, then I apologize: I'm new here, and I don’t know so much.

PPS If there is a desire to automatically hide another level of branches (the first, for example), then at the very beginning of the script there is a variable HIDE_LEVEL, through it you can now set the comment level you want to hide. Screenshot

Source: https://habr.com/ru/post/244715/


All Articles