https://github.com/maz01001/collapsiblegithubprojectfiles
Userscript to make the project files list on GitHub collapsible
https://github.com/maz01001/collapsiblegithubprojectfiles
github repository tampermonkey userscript
Last synced: 3 months ago
JSON representation
Userscript to make the project files list on GitHub collapsible
- Host: GitHub
- URL: https://github.com/maz01001/collapsiblegithubprojectfiles
- Owner: MAZ01001
- License: mit
- Created: 2024-04-11T11:26:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-11T02:04:07.000Z (4 months ago)
- Last Synced: 2025-03-11T03:19:05.844Z (4 months ago)
- Topics: github, repository, tampermonkey, userscript
- Language: JavaScript
- Homepage:
- Size: 385 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Collapsible GitHub project files
A [Tampermonkey](https://www.tampermonkey.net/ "official tampermonkey website") userscript to make the project file lists on GitHub collapsible.
> [!IMPORTANT]
>
> Vote for the [`[Feature] Collapsible project files on Repository overview #109986`](https://github.com/orgs/community/discussions/109986 "open GitHub/community discussion 109986")
>
> If you want this to be a built-in feature on GitHub or generally argue about whether this is a good idea or not.
Uses `localStorage` to be persistent on `github.com` domain when reloading page/browser:
- `github_collapse` stores _collapse state_ (`0` or `1`)
- `github_collapse_auto` stores _collapse type_ (`auto`, `expanded`, `collapsed`, or `last`)Shows an extra row at the top of the files/folders list with two buttons `show NUM rows // DEFAULT`:
- `show/hide NUM rows` will toggle the list when clicked
- `NUM` displays the number of files/folders in the list
- `DEFAULT` shows the _collapse type_ used and when clicked will cycle through them as follows
- `auto` (default) only collapse when a README is displayed
- `expanded` never collapse
- `collapsed` allways collapse
- `last` uses last _collapse state_ (starts collapsed)Click [here](https://github.com/MAZ01001/CollapsibleGitHubProjectFiles/raw/main/github_collapse.user.js "GitHub raw URL to github_collapse.user.js file") to see this userscript in tampermonkey (if you have the plugin installed) to add it to your list of userscripts.