- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 173
 
GitHub files filter
        Rob Garrison edited this page Jan 29, 2019 
        ·
        27 revisions
      
    A userscript that adds filters that toggle the view of repo files by extension
- A group of buttons are added above the repository files, each one is set to filter a file name extension.
 - In v1.1.0, extension subcategories are now separate, e.g. "user.js" and "js" target different files.
 - 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 filters to toggle the view of the files.
 - Hovering over the filter will show the number of files found for that extension.
 - Filter selections will be saved between sessions.
 - 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 "«min»" filter button toggles all files with a 
.min.in the name. It is only added if such files exist. 
 - Made to work along with the GitHub image preview userscript; requires image-preview version 1.1.10+ for the best experience.
 - Inspired by hide-files-on-github extension & a bunch of code copied from the github-diff-files-filter userscript.
 - Click this link to install from GitHub; or, install from GreasyFork or OpenUserJS.
 - To do:
- Add toggle for submodule and dot-folders.
 
 


- Update mutation script.
 
- Strikethrough applied filter names. See PR #68.
 
- Update mutation script.
 
- Limit subcategories.
- Ignore version numbers ("1.0" and "1.0.0").
 - Strings with periods (e.g. "vs.").
 - See https://github.com/tpn/pdfs.
 
 
- Don't hide image preview up tree link.
 
- Code cleanup.
 - Add selected and hover styling. See issue #46.
 - Split out extension subcategories, e.g. "user.js" is now separate from "js".
 - Add focused button styling. See issue #46.
 
- Update mutation script.
 
- Update mutation script.
 
- Update mutation script url.
 
- Update selector to match GitHub change.
 
- Update assets.
 
- Update mutation script url.
 
- Sort extensions with special filters first. Test on https://github.com/rbsec/sslscan, where the ".1" extension was appearing between the ":" filters.
 
- Initial commit.