Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Letson-EstimatedEarnings
  3. // @namespace    https://letsoncorp.com
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        https://letsoncorp.com/Youtube/EstimatedEarnings
  8. // @grant        none
  9. // ==/UserScript==
  10. /* jshint -W097 */
  11. 'use strict';
  12.  
  13. var totalCurrency = 0;
  14.  
  15. $('.div80 tr').each(function( index ) {
  16.     if ($(this).css('font-weight') !== 'bold') {
  17.         // empty
  18.     }
  19.     else {
  20.         var tds = $(this).find( "td" );
  21.         var earn = $(tds[tds.length - 1])[0].innerText;
  22.         var currency = Number( earn.replace(/[^0-9\.]+/g,""));
  23.         totalCurrency += currency;
  24.     }
  25. });
  26.  
  27. $('body').prepend('<strong>Currency: ' + totalCurrency + '</strong>');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement