Skip to content

Instantly share code, notes, and snippets.

@mpvasilis
Last active December 19, 2021 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpvasilis/5567fdbcc25638948e8fdef0e5b89374 to your computer and use it in GitHub Desktop.
Save mpvasilis/5567fdbcc25638948e8fdef0e5b89374 to your computer and use it in GitHub Desktop.
efood.gr count orders script
var orders = document.getElementsByClassName('user-account-orders-order').length;
var i;
var sum=0;
for (i = 2; i < orders; i++) {
sum=sum+ parseFloat(document.querySelector('li.p-7:nth-child('+i+') > div:nth-child(1) > div:nth-child(5) > div:nth-child(1)').innerText.slice(0, -1));
}
console.log("Total Orders: "+orders);
console.log("Total 💶: "+sum+" €");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment