Skip to content

Instantly share code, notes, and snippets.

@daohoangson
Last active May 18, 2024 03:20
Show Gist options
  • Save daohoangson/c8c03f8f237ef635d7d7052b726716bc to your computer and use it in GitHub Desktop.
Save daohoangson/c8c03f8f237ef635d7d7052b726716bc to your computer and use it in GitHub Desktop.
(async () => {
const unviewedDetails = [...document.querySelectorAll('.Details[data-file-type=".png"]')]
.filter(details => !details.hidden)
const loadDiffs = unviewedDetails.map(details => details.querySelector('.js-button-text'))
.filter(btn => btn !== null && btn.innerText === 'Load diff');
for (const loadDiff of loadDiffs) {
loadDiff.click();
await new Promise(r => setTimeout(r, 2000));
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment