Last active
May 23, 2021 07:49
-
-
Save blockspacer/46f3e5942cd0d33cba976cda8f0145b9 to your computer and use it in GitHub Desktop.
ue4 marketplace all all to checkout
This file contains hidden or 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
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
var arr = $(".add-cart-btn") ; | |
console.log(arr); | |
for (var i = 0; i < arr.length; i++ ) { | |
var cart_amount = $(".cart-amount") ; | |
console.log(cart_amount[0]); | |
if (cart_amount[0] != "50") { | |
arr[i].click(); | |
await sleep(200); | |
} else { | |
console.log("got max. run again"); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment