Skip to content

Instantly share code, notes, and snippets.

@jazeee
Last active October 9, 2025 18:19
Show Gist options
  • Save jazeee/475da2777bb4af4643b132c04958a4f8 to your computer and use it in GitHub Desktop.
Save jazeee/475da2777bb4af4643b132c04958a4f8 to your computer and use it in GitHub Desktop.
Go through each step in a Github code review
function markGithubFileViewed() {
getFirstOldGithubUiViewedCheckbox = () => $('input[type="checkbox"].js-reviewed-checkbox:not([checked])');
getFirstNewGithubUiViewedCheckbox = () => $('button[aria-pressed="false"');
let firstMatchingElement = getFirstOldGithubUiViewedCheckbox() ?? getFirstNewGithubUiViewedCheckbox();
if (!firstMatchingElement) {
console.error('No viewed checkbox found');
return;
}
firstMatchingElement.scrollIntoView();
setTimeout(() => firstMatchingElement.click(), /*Time to Read the code*/10);
}
markGithubFileViewed();
@jazeee
Copy link
Author

jazeee commented Aug 10, 2022

In Chrome debugger for github, can use something like this to go through each file in a PR:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment