Skip to content

Instantly share code, notes, and snippets.

@bwindels
Created January 7, 2022 10:21
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 bwindels/79e2cd3522d3fc8f771d301f913a40da to your computer and use it in GitHub Desktop.
Save bwindels/79e2cd3522d3fc8f771d301f913a40da to your computer and use it in GitHub Desktop.
async function expandAll() {
const nonShownLargeDiffExpanders = Array.from(document.querySelectorAll(".load-diff-button"));
for (const e of nonShownLargeDiffExpanders) {
e.click();
}
await new Promise(r => setTimeout(r, 200));
let expanders;
do {
expanders = Array.from(document.querySelectorAll(".js-expand"));
for (const e of expanders) {
e.click();
}
await new Promise(r => setTimeout(r, 200));
} while (expanders.length);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment