Skip to content

Instantly share code, notes, and snippets.

@jc4p
Created November 2, 2014 02:29
Show Gist options
  • Save jc4p/b0d24cec39856537d1ad to your computer and use it in GitHub Desktop.
Save jc4p/b0d24cec39856537d1ad to your computer and use it in GitHub Desktop.
Check how much you've spent on Uber
// Run this on the JS console when logged into https://riders.uber.com/trips
var currentPage=1;var spent=0;var gotPage=function e(t){if($(t).find("td.text--right").length===0){console.log("All Done! You've spent: "+spent);return}$("td.text--right").each(function(e,t){spent+=parseInt($(this).children().remove().end().text().substring(1))});currentPage+=1;$.get("https://riders.uber.com/trips?page="+currentPage,e);console.log("Loading page "+currentPage)};$.get("https://riders.uber.com/trips?page="+currentPage,gotPage)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment