Skip to content

Instantly share code, notes, and snippets.

@kidsil
Created August 4, 2022 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kidsil/eabfbd3341b1ee95912e9b9005f4ff7b to your computer and use it in GitHub Desktop.
Save kidsil/eabfbd3341b1ee95912e9b9005f4ff7b to your computer and use it in GitHub Desktop.
PR Scripts - bookmarks for GitHub PRs
// Add these to your browser as bookmarks:
// Filter commentless files
javascript:document.querySelectorAll('#files%20>%20div%20>%20div').forEach((e)%20=>%20{%20if%20(e.querySelectorAll('[data-disable-with="Resolving%20conversation%E2%80%A6"]').length%20===%200)%20{%20e.style.display%20=%20'none';%20}%20%20})
// Filter viewed files
javascript:document.querySelectorAll('#files%20input[name="viewed"][data-ga-click$="value:true"]').forEach(e=>{e.closest(".file").style.display="none"});
// Fold All (a bit slow)
javascript:document.querySelectorAll('.file-info > button[aria-expanded="true"]:nth-child(1)').forEach((e) => { e.click() })
// Expand All (a bit slow)
javascript:document.querySelectorAll('.file-info > :not(button[aria-expanded="true"]:nth-child(1))').forEach((e) => { e.click() })
// Load all Diffs if hidden (super useful!)
javascript:document.querySelectorAll('#files%20.load-diff-button').forEach((e)%20=>%20e.click());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment