Skip to content

Instantly share code, notes, and snippets.

@vlussenburg
Created October 8, 2021 23:48
Show Gist options
  • Save vlussenburg/f92a983c13884302a919a0dd905e3a0c to your computer and use it in GitHub Desktop.
Save vlussenburg/f92a983c13884302a919a0dd905e3a0c to your computer and use it in GitHub Desktop.
JavaScript snippet to empty out your Whole Foods cart on Amazon
function deleteWholeFoodsCart() {
var query = document.querySelectorAll("#sc-expanded-cart-localmarket input[value='Delete']")
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteWholeFoodsCart, 500);
}
else {
console.log('Finished');
}
}
deleteWholeFoodsCart();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment