Skip to content

Instantly share code, notes, and snippets.

@fdev
Created August 23, 2019 10:10
Show Gist options
  • Select an option

  • Save fdev/f94c63184b7116e684d4ea7c959db3d2 to your computer and use it in GitHub Desktop.

Select an option

Save fdev/f94c63184b7116e684d4ea7c959db3d2 to your computer and use it in GitHub Desktop.
GitHub pull request mark all files as "Viewed"
// Execute in JavaScript console while on the "Files changed" page
var checkboxes = document.querySelectorAll('input[name="viewed"]:not(:checked)');
for (var i = 0; i < checkboxes.length; i++) {
checkboxes[i].click();
}
// One-liner that can be used as a bookmark
javascript:void((function(d){d.querySelectorAll('input[name="viewed"]:not(:checked)').forEach(function(c){c.click()})})(document));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment