daily pastebin goal
54%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2018 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var table,
  2.     table_trs,
  3.     table_tds,
  4.     table_tds_filtered,
  5.     message;
  6.  
  7. var cache = function() {
  8.     message = '';
  9.     table = $("table");
  10.     table_trs = table.find("tr");
  11.     table_tds = table_trs.find("td");
  12.     table_tds_filtered = table_tds.filter(function(i,el){
  13.         return $(el).css("color") !== $(el).css("background-color");
  14.     });
  15. }
  16.  
  17. var composeMessage = function() {
  18.     table_tds_filtered.each(function(){
  19.         message += $(this).text();
  20.     });
  21. }
  22.  
  23. function solution() {
  24.     cache();
  25.     composeMessage();
  26.     return message;
  27. }
RAW Paste Data
Top