Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript: var idcolor = new Array();
- var clrList = new Array("#ffe0ff", "#c8d6ff", "#ffe0e0", "#ffffe0", "#fff0ff", "#fff0e0", "#e0ffff", "#e0fff0", "#fffff0", "#e0ffe0", "#e0e0ff", "#f0e0ff", "#f0ffff", "#e0e8ff", "#e1e8ff", "#cafff1", "#e8e1ff", "#e9ffe1");
- function clrSet() {
- for (var i = 0; i < $("#online-participants .participant-list-item").length; i++) {
- if (!idcolor[$("#online-participants .participant-list-item")[i].id]) {
- idcolor[$("#online-participants .participant-list-item")[i].id] = clrList[i];
- }
- $('.' + $("#online-participants .participant-list-item")[i].id).css('background-color', idcolor[$("#online-participants .participant-list-item")[i].id]);
- }
- }
- function dateTimeSet() {
- for (var i = 0; i < $("#live dd").length; i++) {
- if(!$("#live dd").eq(i).attr("title")){
- $("#live dd").eq(i).attr("title",Date($("#live dd").eq(i).attr("data-timestamp")*1000));
- }
- }
- }
- clrSet();
- dateTimeSet();
- socket.on('message', function (message) {
- clrSet();
- dateTimeSet();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement