Last active
May 23, 2018 07:08
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Increases pause if more items