X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=1563ec82dfecbb0edaec70f162ff3bfe05bdac88;hb=93d7a6690daa9a9138277a8d83edb766fb2bab8a;hp=9d07b5d01ea5d5938afa18ccf8acfc97f2602d6a;hpb=f341c32413c83788cf6cf23fe911c401c2f9adad;p=brisk.git diff --git a/web/commons.js b/web/commons.js index 9d07b5d..1563ec8 100644 --- a/web/commons.js +++ b/web/commons.js @@ -1026,10 +1026,18 @@ var CHATT_MAXLINES = 40; function user_decorator(user) { - var name; - var flags = user[0]; - if ((flags & 0x03) != 0) - name = ""+user[1]+""; + var name, i, sp = "", cl = ""; + var flags = user[0] & 0x03 | ((user[0] & 0x040000) >> 16); + + for (i = 0 ; i < 3 ; i++) { + if (flags & (1 << i)) { + cl += sp + "au" + i; + sp = " "; + } + } + + if (flags != 0) + name = ""+user[1]+""; else name = user[1]; @@ -1220,38 +1228,20 @@ function topbanner_cb() // console.log("A: "+a+" B: "+b); } -function sidebanner_init() -{ - setInterval(sidebanner_cb, 666); -} - -function sidebanner2_init() +function sidebanner_init(idx) { - setInterval(sidebanner2_cb, 666); -} - -function sidebanner_cb() -{ - var a, b; - - a = $('sidebanner').style.backgroundColor; - b = $('sidebanner').style.borderLeftColor; - - $('sidebanner').style.backgroundColor = b; - $('sidebanner').style.borderColor = a+" "+a+" "+a+" "+a; - - // console.log("A: "+a+" B: "+b); + setInterval(function () { sidebanner_cb(idx); }, 666); } -function sidebanner2_cb() +function sidebanner_cb(idx) { var a, b; - a = $('sidebanner2').style.backgroundColor; - b = $('sidebanner2').style.borderLeftColor; + a = $('sidebanner'+idx).style.backgroundColor; + b = $('sidebanner'+idx).style.borderLeftColor; - $('sidebanner2').style.backgroundColor = b; - $('sidebanner2').style.borderColor = a+" "+a+" "+a+" "+a; + $('sidebanner'+idx).style.backgroundColor = b; + $('sidebanner'+idx).style.borderColor = a+" "+a+" "+a+" "+a; // console.log("A: "+a+" B: "+b); }