Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GitHub collapse in comment

Rob Garrison edited this pageOct 24, 2022 ·29 revisions

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.
    • UseShift + Click to toggle all the view of all blocks within the same issue comment.
    • UseShift + (Ctrl or) + Click to toggle all blocks on the page.
  • Can be used along with theGitHub-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 to10 by default).
    • "Set GitHub Collapse in Comment Initial State" toexpanded 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.
  • Clickthis link to install from GitHub; or, install fromGreasyFork orOpenUserJS.
  • Or, you can install it as a browser addon. Check outOctopatcher!

Screenshot

Change Log

Version 1.0.23 (2022-10-24)

  • Update dependencies

Version 1.0.22 (2021-07-21)

  • Update mutation script.

Version 1.0.21 (2021-01-31)

  • Update mutation script.

Version 1.0.20 (2019-02-16)

  • Update GitHub icon.

Version 1.0.19 (2019-01-28)

  • Update mutation script.

Version 1.0.18 (2018-10-05)

  • Update mutation script.

Version 1.0.17 (2018-08-13)

  • Support Cmd + Shift + Click for Macs.

Version 1.0.16 (2018-05-17)

  • Update mutation script.

Version 1.0.15 (2018-05-10)

  • Update mutation script.

Version 1.0.14 (2018-04-09)

  • Update mutation script url.

Version 1.0.13 (2018-01-18)

  • Extract syntax type from class name.
  • Update assets.

Version 1.0.12 (2017-10-08)

  • Update mutation script url.

Version 1.0.11 (2017-05-16)

  • Change license to MIT.

Version 1.0.10 (2017-04-21)

  • Update mutation url.

Version 1.0.7 - 1.0.9 (2017-04-13)

  • Switch to using mutations.js.

Version 1.0.6 (2017-03-25)

  • Use pjax & preview events.

Version 1.0.5 (2017-01-11)

  • Clean up "closest" function.
  • UseclassList toggle.

Version 1.0.4 (2016-10-03)

  • Show current state when changing option. Seeissue #12.

Version 1.0.3 (2016-10-02)

  • Change initial state choices to "collapsed" or "expanded". Seeissue #12.

Version 1.0.2 (2016-09-12)

  • Beautify.

Version 1.0.1 (2016-07-30)

  • Improve accessibility of header.
  • Fix squished collapsed arrow.

Version 1.0.0 (2016-06-27)

  • Initial commit.

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp