Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var script = document.createElement('script');
- script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";
- document.getElementsByTagName('head')[0].appendChild(script);
- arrColors = {};
- setTimeout(function(){
- countBlack = 0;
- countRed = 0;
- countYellow = 0;
- countGreen = 0;
- $('table > tbody > tr').each(function(index, element) {
- if ($(element).attr('class') === 't-color') {
- color = $(element).find('td:eq(1) p').css("background-color");
- if (color === 'rgb(40, 40, 40)') {
- countBlack++;
- } else if (color === 'rgb(225, 19, 75)') {
- countRed++;
- } else if (color === 'rgb(255, 180, 0)') {
- countYellow++;
- } else if (color === 'rgb(28, 195, 69)') {
- countGreen++;
- }
- }
- });
- arrColors['1_black'] = countBlack;
- arrColors['1_red'] = countRed;
- arrColors['1_yellow'] = countYellow;
- arrColors['1_green'] = countGreen;
- }, 500);
- $(".slid .rig-bsl").click();
- setTimeout(function(){
- countBlack = 0;
- countRed = 0;
- countYellow = 0;
- countGreen = 0;
- $('table > tbody > tr').each(function(index, element) {
- if ($(element).attr('class') === 't-color') {
- color = $(element).find('td:eq(1) p').css("background-color");
- if (color === 'rgb(40, 40, 40)') {
- countBlack++;
- } else if (color === 'rgb(225, 19, 75)') {
- countRed++;
- } else if (color === 'rgb(255, 180, 0)') {
- countYellow++;
- } else if (color === 'rgb(28, 195, 69)') {
- countGreen++;
- }
- }
- });
- arrColors['2_black'] = countBlack;
- arrColors['2_red'] = countRed;
- arrColors['2_yellow'] = countYellow;
- arrColors['2_green'] = countGreen;
- }, 1000);
- console.log(arrColors);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement