X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=192094d4e013f2d2b21f819881ec84ac216294f0;hb=536da22ebde5fa66e0f7524e9efc0316391f1afd;hp=f522ad538f85aa6325f28a342598947c3c23bfff;hpb=2dafd9b1a8edbf64595bee1e669be6c95921bf61;p=brisk.git diff --git a/web/commons.js b/web/commons.js index f522ad5..192094d 100644 --- a/web/commons.js +++ b/web/commons.js @@ -25,7 +25,7 @@ var PLAYERS_N = 3; var EXIT_BAN_TIME = 3600; var cookiepath = "/brisk/"; -var mlang_commons = { 'imgload_a' : { 'it' : 'Immagine caricate ', +var mlang_commons = { 'imgload_a' : { 'it' : 'Immagini caricate ', 'en' : 'Loaded images ' }, 'imgload_b' : { 'it' : '%.', 'en' : '%.' }, @@ -49,6 +49,18 @@ var mlang_commons = { 'imgload_a' : { 'it' : 'Immagine caricate ', function $(id) { return document.getElementById(id); } +function dec2hex(d, padding) +{ + var hex = Number(d).toString(16); + padding = typeof (padding) === "undefined" || padding === null ? padding = 2 : padding; + + while (hex.length < padding) { + hex = "0" + hex; + } + + return hex; +} + function getStyle(x,IEstyleProp, MozStyleProp) { if (x.currentStyle) { @@ -835,7 +847,7 @@ function user_dec_and_state(el) var val_el; content = user_decorator(el); - content += state_add(el[0]); + content += state_add(el[0],(typeof(el[2]) != 'undefined' ? el[2] : null)); return (content); } @@ -1183,7 +1195,7 @@ function url_complete(parent, url) } // alert("host: ["+host+"] path: ["+path+"]"); - if (url.substring(0,6) == 'http:/' || url.substring(0,7) == 'https:/') { + if (url.substring(0,6) == 'http:/' || url.substring(0,7) == 'https:/' || url.substring(0,4) == 'ws:/') { return (url); } else if (url.substring(0,1) == '/') {