-
-
Notifications
You must be signed in to change notification settings - Fork 165
GitHub diff files filter
Rob Garrison edited this page Jun 26, 2017
·
30 revisions
A userscript that adds filters that toggle diff & PR files by extension
- A group of buttons are added above diff & pull request files, each one is set to filter a file name extension.
- The filters are only visible when there is more than one type of file extension present in the folder.
- Files with no extension will be labeled as "«no-ext»".
- Click on one or more buttons to toggle the view of the files.
- Hovering over the filter will show the number of files of that type.
- Special Filters:
- The "«all»" filter button toggles the view of all files.
- The "«no-ext»" filter button toggles all files that do not have an extension. It is only added if such files exist.
- The "«dot-files»" filter button toggles all dot-files (e.g.
.gitignore
,.gitattributes
, etc). It is only added if such files exist.
- Original idea from the Github Pr Filter extension.
- Click this link to install from GitHub, or install from GreasyFork.
- After installing, try the userscript on this page: repo inital commit.
- Change license to MIT.
- Update mutation url.
- Allow updating of filters.
- Switch to using mutations.js.
- Added tooltip showing the number of files for each filter.
- Use pjax event & fix linting.
- Clean up "closest" function.
- Check for empty arrays, then check type length.
- Initial commit.