Advertisement
SpeakeazyYT

Untitled

Jul 16th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var script = document.createElement('script');
  2. script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";
  3. document.getElementsByTagName('head')[0].appendChild(script);
  4.  
  5. arrColors = {};
  6.  
  7. setTimeout(function(){
  8.  
  9.     countBlack = 0;
  10.     countRed = 0;
  11.     countYellow = 0;
  12.     countGreen = 0;
  13.  
  14.     $('table > tbody > tr').each(function(index, element) {
  15.         if ($(element).attr('class') === 't-color') {
  16.             color = $(element).find('td:eq(1) p').css("background-color");
  17.             if (color === 'rgb(40, 40, 40)') {
  18.                 countBlack++;
  19.             } else if (color === 'rgb(225, 19, 75)') {
  20.                 countRed++;
  21.             } else if (color === 'rgb(255, 180, 0)') {
  22.                 countYellow++;
  23.             } else if (color === 'rgb(28, 195, 69)') {
  24.                 countGreen++;
  25.             }
  26.         }
  27.     });
  28.  
  29.     arrColors['1_black'] = countBlack;
  30.     arrColors['1_red'] = countRed;
  31.     arrColors['1_yellow'] = countYellow;
  32.     arrColors['1_green'] = countGreen;
  33.  
  34. }, 500);
  35.  
  36. $(".slid .rig-bsl").click();
  37.  
  38. setTimeout(function(){
  39.  
  40.     countBlack = 0;
  41.     countRed = 0;
  42.     countYellow = 0;
  43.     countGreen = 0;
  44.  
  45.     $('table > tbody > tr').each(function(index, element) {
  46.         if ($(element).attr('class') === 't-color') {
  47.             color = $(element).find('td:eq(1) p').css("background-color");
  48.             if (color === 'rgb(40, 40, 40)') {
  49.                 countBlack++;
  50.             } else if (color === 'rgb(225, 19, 75)') {
  51.                 countRed++;
  52.             } else if (color === 'rgb(255, 180, 0)') {
  53.                 countYellow++;
  54.             } else if (color === 'rgb(28, 195, 69)') {
  55.                 countGreen++;
  56.             }
  57.         }
  58.     });
  59.  
  60.     arrColors['2_black'] = countBlack;
  61.     arrColors['2_red'] = countRed;
  62.     arrColors['2_yellow'] = countYellow;
  63.     arrColors['2_green'] = countGreen;
  64.  
  65. }, 1000);
  66.  
  67. console.log(arrColors);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement