Skip to content

Instantly share code, notes, and snippets.

@glenndevenish
Last active May 23, 2018 07:08
Show Gist options
  • Save glenndevenish/610e7c35cbb6165878b1a2bcb158124c to your computer and use it in GitHub Desktop.
Save glenndevenish/610e7c35cbb6165878b1a2bcb158124c to your computer and use it in GitHub Desktop.
Automatically select oldest batches where option isn't available by default on Unleashed (unleashedsoftware.com)
async function selectBatches (pause) {
const wait = (ms) => {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}
$('.fa-plus-square').each(i => $('.fa-plus-square')[i].click())
await wait(pause)
$("a:contains('Select Oldest')").each(i => $("a:contains('Select Oldest')")[i].click())
await wait(pause)
$('.fa-minus-square').each(i => $('.fa-minus-square')[i].click())
}
selectBatches($('.fa-plus-square').length * 2)
@glenndevenish
Copy link
Author

Increases pause if more items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment