Skip to content

Instantly share code, notes, and snippets.

@vishalkakadiya
Last active September 26, 2020 05:44
Show Gist options
  • Select an option

  • Save vishalkakadiya/b091162b3c640d5f987b323aeea3bfa8 to your computer and use it in GitHub Desktop.

Select an option

Save vishalkakadiya/b091162b3c640d5f987b323aeea3bfa8 to your computer and use it in GitHub Desktop.
Collapse all files in github's PR while viewing changes tab/section in PR.
// JUST run below code in your browser's console, in the browser's tab where PR is open.
var x = document.getElementsByClassName("js-details-container");
var i;
for (i = 0; i < x.length; i++) {
x[i].className = x[i].className.replace(/\bDetails--on\b/g, "");
x[i].className = x[i].className.replace(/\bopen\b/g, "");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment