X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=1563ec82dfecbb0edaec70f162ff3bfe05bdac88;hb=ac58e12ad31f22ad17c964ad3a36d10390c3dbe3;hp=b95519be3d046a3908d000c7d95d016adf2d0693;hpb=a53bab3c7b384a95a807ddd64fe93a6564be5504;p=brisk.git diff --git a/web/commons.js b/web/commons.js index b95519b..1563ec8 100644 --- a/web/commons.js +++ b/web/commons.js @@ -1026,11 +1026,18 @@ var CHATT_MAXLINES = 40; function user_decorator(user) { - var name; + 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]+""; + name = ""+user[1]+""; else name = user[1]; @@ -1221,38 +1228,20 @@ function topbanner_cb() // console.log("A: "+a+" B: "+b); } -function sidebanner_init() +function sidebanner_init(idx) { - setInterval(sidebanner_cb, 666); -} - -function sidebanner2_init() -{ - 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); }