-
-
Notifications
You must be signed in to change notification settings - Fork 165
GitHub diff files filter
Rob Garrison edited this page Jan 29, 2019
·
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. - The "«renamed»" filter button toggles all files that have been either renamed or moved; these files may or may not have been edited (added v1.1.0).
- Original idea from the Github Pr Filter extension.
- Click this link to install from GitHub; or, install from GreasyFork or OpenUserJS.
- After installing, try the userscript on this page: repo inital commit.
- Update mutation script.
- Include folder filter (accidentally published). It works, but the results are not 100% reliable.
- Update mutation script.
- Add «renamed» filter. This allows toggling of files that have renamed or moved. These files may or may not have been edited.
- Update mutation script.
- Update mutation script.
- Update mutation script url.
- Update assets.
- Update mutation script url.
- Fix linting issues.
- 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.