Skip to content

Instantly share code, notes, and snippets.

@shramee
Last active July 23, 2018 15:45
Show Gist options
  • Select an option

  • Save shramee/07cf2e1a602a55ff48de6bb8cdb24913 to your computer and use it in GitHub Desktop.

Select an option

Save shramee/07cf2e1a602a55ff48de6bb8cdb24913 to your computer and use it in GitHub Desktop.
Just paste this in console on page earnings history after logging in. https://www.upwork.com/earnings-history/
function getPending() {
var amount = 0;
$( 'tr.oPending' ).each( function() {
var
$t = $(this),
amt = $t.children( ':eq(4)' ).html().split( '<br>' )[0];
amt = amt.trim().replace( '$', '' )
if ( 0 == amt.indexOf( '(' ) ) {
amt = amt.replace( '(', '' ).replace( ')', '' ) * -1
}
amount += parseFloat( amt );
} )
return amount;
}
@shramee

shramee commented May 9, 2018

Copy link
Copy Markdown
Author

To use simply...

  1. Open https://www.upwork.com/earnings-history/ after logging in.
  2. Paste the code above in console.
  3. Run getPending() in console.

Bingo your pending balance is returned 😉

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment