-
-
Notifications
You must be signed in to change notification settings - Fork 166
GitHub code folding
Rob Garrison edited this page Oct 24, 2022
·
29 revisions
A userscript that adds code folding to GitHub files
- This code only works on GitHub files (with line numbers), not in markdown code.
- Works for both space and tab indentation.
- This code was modified from the GitHub Code Folding Chrome extension by @noam3127 (MIT license).
- Clicking on an arrow will collapse a section of code with the same indentation level.
- Using Shift click on an arrow will collapse all sections of the same code indentation level.
- After collapsing a code block, click on either the arrow (left side) or on the ellipsis (right side), to re-expand the code block.
- Click this link to install from GitHub; or, install from GreasyFork or OpenUserJS.
- Update dependencies
- Update mutation script.
- Update utils script.
- Update mutation script.
- Updated selectors to match new GitHub class names.
- Added support for gists.
- General code cleanup.
- Update GitHub icon.
- Update mutation script.
- Update mutation script.
- Make github-code-folding.user.js work on mobile layout. See PR #47; thanks @zb3!
- Reformat & version bump.
- Update mutation script.
- Update mutation script.
- Update mutation script url.
- Fix arrow position.
- Update GM4 polyfill.
- Add GM4 polyfill & update assets.
- Remove incorrect code padding.
- Update mutation script url.
- Position ellipsis above code guides.
- Append collapse arrow (prevent interference with whitespace userscript).
- Change license to MIT.
- Update mutation url.
- Switch to using mutations.js.
- Use pjax event & fix linting.
- Clean up "closest" function.
- Use
classList
toggle.
- Initial commit