Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript: var idcolor = new Array();
- var clrList = new Array("#b4eaf7","#f7e2b9","#cb91f8","#b2f2df","#ffffe7","#d9fbff","#bae2e2","#f1f7b4","#f8c6e5","#fecbe2","#c6f3f8","#e4ffec","#ecffc4","#f2ecff","#decbd5","#ffffff","#abfedd","#b8f5e2","#e0f7bd","#ffefff","#c398ba","#ece2fe","#bcdbf7","#c1da9b","#cccccc","#9cf5b7","#faf49c","#ffeefe","#f9c5f7","#efefef","#b3f7bb","#f7eb98","#f8a291","#d7f7be","#f7cec9","#ca8c95","#c9bbf7","#ccd1d2","#e0f7b2","#ffdad3","#98d2fe","#bcdbf7","#fed8f2");
- 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();
- });
- socket.onerror('message', function (message) {
- clrSet();
- dateTimeSet();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement