Advertisement
Guest User

tlksepPlusTime

a guest
Jul 24th, 2013
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. javascript: var idcolor = new Array();
  2. var clrList = new Array("#ffe0ff", "#c8d6ff", "#ffe0e0", "#ffffe0", "#fff0ff", "#fff0e0", "#e0ffff", "#e0fff0", "#fffff0", "#e0ffe0", "#e0e0ff", "#f0e0ff", "#f0ffff", "#e0e8ff", "#e1e8ff", "#cafff1", "#e8e1ff", "#e9ffe1");
  3.  
  4. function clrSet() {
  5. for (var i = 0; i < $("#online-participants .participant-list-item").length; i++) {
  6. if (!idcolor[$("#online-participants .participant-list-item")[i].id]) {
  7. idcolor[$("#online-participants .participant-list-item")[i].id] = clrList[i];
  8. }
  9. $('.' + $("#online-participants .participant-list-item")[i].id).css('background-color', idcolor[$("#online-participants .participant-list-item")[i].id]);
  10. }
  11. }
  12. function dateTimeSet() {
  13. for (var i = 0; i < $("#live dd").length; i++) {
  14. if(!$("#live dd").eq(i).attr("title")){
  15. $("#live dd").eq(i).attr("title",Date($("#live dd").eq(i).attr("data-timestamp")*1000));
  16. }
  17.  
  18. }
  19. }
  20. clrSet();
  21. dateTimeSet();
  22. socket.on('message', function (message) {
  23. clrSet();
  24. dateTimeSet();
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement