Toggle a file's Viewed state on GitHub's pull request UI by hovering over the file and pressing Space.
- On an expanded file, Space marks it viewed, collapses it, and scrolls the next rendered file to the top of the visible diff region.
- On a collapsed file, Space marks it unviewed, expands it, and scrolls it to the top of the visible diff region.
- Space retains its normal behavior while typing in comments and other form fields.
- Both the redesigned and classic GitHub Files changed pages are supported.
This is a customized fork of
nbolton/github-review-shortcut.
Because the core keybinding changed from Escape to Space, the modifications are not intended for upstream submission.
- Install the Tampermonkey extension.
- In the Tampermonkey dashboard, create a new script.
- Replace the editor contents with
main.js, then save.