SHARE
TWEET

OpenTrade USD Price Shower v2

a guest Jun 11th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         OTUPS
  3. // @namespace    OpenTrade USD Price Shower
  4. // @version      0.2
  5. // @description  Show USD price
  6. // @author       DEMENTOR
  7. // @match        https://trade.multicoins.org/
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12.     'use strict';
  13.     setInterval(function(){
  14.         insertPrices();
  15.     },1000);
  16.  
  17.     function insertPrices(){
  18.         // test
  19.         var ARR_Pairs = ["BTC", "LTC", "BCH", "DASH", "DOGE"];
  20.         var ARR_USD   = [6796, 107, 937, 269, 0.003];
  21.         var MC_ARR = ["", "", "", "", ""];
  22.         var MC_ARR_USD = [0, 0, 0, 0, 0];
  23.         for (var i = 0; i < ARR_USD.length; i++){
  24.             MC_ARR[i] = $('#table-market tr:contains("' + ARR_Pairs[i] + '") td:eq(1)').text();
  25.             MC_ARR_USD[i] = ARR_USD[i]/MC_ARR[i];
  26.             $('#table-market tr:contains("' + ARR_Pairs[i] + '") td:eq(0)').html(ARR_Pairs[i] + ' (' + MC_ARR_USD[i].toFixed(5) + ')');
  27.         }
  28.     }
  29.  
  30. })();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top