Created
November 2, 2014 02:29
-
-
Save jc4p/b0d24cec39856537d1ad to your computer and use it in GitHub Desktop.
Check how much you've spent on Uber
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
// 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