Last active
July 23, 2018 15:45
-
-
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/
This file contains hidden or 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
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use simply...
getPending()
in console.Bingo your pending balance is returned 😉