Advertisement
leathan

Script for Bittrex

Jun 9th, 2017
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         New Userscript
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        https://bittrex.com/*
  8. // @grant        none
  9. // ==/UserScript==
  10. (function() {
  11.  
  12. //IF YOU ARE GOING TO PASTE THIS SCRIPT INTO THE CONSOLE START COPYING HERE.
  13.  
  14. var matches = false; var oldmatches; var table = {};
  15. setInterval(function() {
  16. $('.menu-table').children().each(function(i) {
  17.         if (typeof table[i] === "undefined") { table[i] = {}; }
  18.         if (typeof table[i].matches != "undefined") table[i].oldmatches = table[i].matches;
  19.         table[i].matches = $(this).children()[0].innerHTML.match(/(\d\.\d{8})/g);
  20.         if (typeof table[i].oldmatches === "undefined") table[i].oldmatches = table[i].matches;
  21.         try {
  22.             for(var j = 0; j < table[i].matches.length; j++) {
  23.                     var k=j+1;
  24.                     if (parseFloat(table[i].matches[j]) < parseFloat(table[i].oldmatches[j])) {
  25.                         $(this).children().find('td:nth-child('+ k +')').css('background-color','red');
  26.                     } else if (parseFloat(table[i].matches[j]) > parseFloat(table[i].oldmatches[j])) {
  27.                         $(this).children().find('td:nth-child('+ k +')').css('background-color','LightGreen');
  28.                     }
  29.             }
  30.         } catch(e) {}
  31. });
  32. }, 700);
  33.  
  34. //IF YOU ARE GOING TO PASTE THIS SCRIPT INTO THE CONSOLE STOP COPYING HERE.
  35. //FOR HELP ASK LEATHAN
  36.  
  37. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement