-
-
Notifications
You must be signed in to change notification settings - Fork 167
GitHub toggle expanders
Rob Garrison edited this page Oct 24, 2022
·
22 revisions
A userscript that toggles all expanders when one expander is shift-clicked
- This userscript works on repository commit, release, pull request & compare pages.
- Toggle expanders (
…
)- Click to toggle a single expander as normally.
- Use Shift + Click on an expander to toggle all expanders within a date block (New behavior in v2.0.0)
- Use (Ctrl or ⌘) + Shift + Click on an expander to toggle all expanders on the page (New behavior in v2.0.0).
- Example page: https://github.com/torvalds/linux/commits/master (Shift + click on a commit title ellipsis).
- Resolved
Outdatedreviews (added v1.1.0; updated v2.0.0)- Click to toggle the resolved review as normally.
- Use Shift + Click to toggle all outdated blocks within a single review.
- Use (Ctrl or ⌘) + Shift + Click to toggle all resolved blocks on the page.
- The script was inspired by this thread: https://github.com/dear-github/dear-github/issues/193 and pull #22.
- Click this link to install from GitHub; or, install from GreasyFork or OpenUserJS.
-
Compare pages
- Click to toggle a single expander as normally.
- Use Shift + Click on an expander to toggle all expanders on the page.
- In this case, adding the Ctrl key does not change the behavior. As requested.
-
As mentioned in issue #135, the state of the toggle expander is not shown by the button itself. If you use Stylus, you can add, and adjust the following css to change the color:
.Details--on .ellipsis-expander { background: var(--color-scale-blue-2); }
- Fix resolved comments toggling.
- Update dependencies.
- Update selector. Closes issue #131.
Update to use new GitHub class names:
- Changed commit, release & pull request behavior:
- Using Shift + Click on an expander only toggles the other expanders within a date block.
- Using (Ctrl or ⌘) + Shift + Click on an expander now toggles all expanders.
- Fixes issues #100, #101 & #87.
- Allow shift-click only on compare. Fixes issue #87.
- Update GitHub icon.
- Update for GitHub's details component.
- Update assets.
- Fix lint issue.
- Change license to MIT.
- Update to work in releases pages; thanks @darkred!
- Fix linting.
- Clean up
closest
function. - Use
classList
toggle.
- Target selectors inside of commit lists. Fixes issue #8.
- Initial commit.
- Fix URL.