Install
Mottie / GitHub Collapse In Comment

Published:

Version: 1.0.23+e9b4dc6 updated

Summary: A userscript that adds a header that can toggle long code and quote blocks in comments

Groups:

Support: https://github.com/Mottie/GitHub-userscripts/issues

License: MIT

A userscript that adds a header that can toggle long code and quote blocks in comments

  • The block header:
    • Allows the toggling of the long code & quote block views.
    • Includes the code language based on the syntax highlighting class name; if highlighting is not applied, "Block" is used as the default name.
    • Includes the number of lines within the block.
    • Click the header to toggle the view of the content immediately below the header.
    • Use Shift + Click to toggle all the view of all blocks within the same issue comment.
  • Can be used along with the [[GitHub-collapse-markdown]] userscript.
  • Use the userscript addon to change these settings (see screenshot below):
    • "Set GitHub Collapse in Comment Max Lines" to the number of lines within a block needed to add a header (set to 10 by default).
    • "Set GitHub Collapse in Comment Initial State" to expanded to not have the blocks initially collapsed (collapsed by default).
    • After changing either option, make sure to reload the page (Shift + F5) to have the updated setting take effect.
  • See the change log here.
  • Or, you can install it as a browser addon. Check out Octopatcher!

github-collapse-in-comment

Hosted with ♥ at GitHub

Rating: 0