From f0aad4d28fe21bd862e3230c16bc87c5be4c6034 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Thu, 28 Jan 2016 18:41:01 +0100 Subject: [PATCH] spaces cleanup --- web/commons.js | 96 +++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/web/commons.js b/web/commons.js index e6e793d..0540cc7 100644 --- a/web/commons.js +++ b/web/commons.js @@ -2,7 +2,7 @@ * brisk / fieldify - commons.js * * Copyright (C) 2006-2016 Matteo Nastasi - * mailto: nastasi@alternativeoutput.it + * mailto: nastasi@alternativeoutput.it * matteo.nastasi@milug.org * web: http://www.alternativeoutput.it * @@ -27,7 +27,7 @@ var cookiepath = "/brisk/"; var mlang_commons = { 'imgload_a' : { 'it' : 'Immagini caricate ', 'en' : 'Loaded images ' }, - 'imgload_b' : { 'it' : '%.', + 'imgload_b' : { 'it' : '%.', 'en' : '%.' }, 'gamleav' : { 'it' : 'Sei sicuro di volere lasciare questa mano?' , 'en' : 'Are you sure to leave this game?' }, @@ -64,7 +64,7 @@ function dec2hex(d, padding) return hex; } -function getStyle(x,IEstyleProp, MozStyleProp) +function getStyle(x,IEstyleProp, MozStyleProp) { if (x.currentStyle) { var y = x.currentStyle[IEstyleProp]; @@ -81,7 +81,7 @@ function getStyle(x,IEstyleProp, MozStyleProp) /*Copy the default setInterval behavior*/ var nativeSetInterval = window.setInterval; - window.setInterval = function(fn,ms) { + window.setInterval = function(fn,ms) { var param = []; if(arguments.length <= 2) { return nativeSetInterval(fn,ms); @@ -89,16 +89,16 @@ function getStyle(x,IEstyleProp, MozStyleProp) else { for(var i=2;i"; im.onload = update_images; im.onerror = error_images; @@ -268,7 +268,7 @@ function send_mesg(mesg) { var xhr_wr = createXMLHttpRequest(); var is_conn = (sess == "not_connected" ? false : true); - + // alert("xhr_wr: "+xhr_wr+" is_conn: "+is_conn); xhr_wr.open('GET', 'index_wr.php?&'+(is_conn ? 'sess='+sess : '')+'&stp='+gst.st+'&mesg='+mesg, (is_conn ? true : false)); xhr_wr.setRequestHeader("If-Modified-Since", new Date().toUTCString()); @@ -324,11 +324,11 @@ function server_request(page, sess) } xhr_wr.onreadystatechange = function() { return; }; xhr_wr.send(post_collect); - + if (xhr_wr.responseText != null) { // console.log("server_request:resp: "+xhr_wr.responseText); return (xhr_wr.responseText); - } + } else return (null); } @@ -408,7 +408,7 @@ function act_mesgtoadm() function act_tav() { - act_chatt('/tav '+$('txt_in').value); + act_chatt('/tav '+$('txt_in').value); $('txt_in').value = ''; } @@ -465,7 +465,7 @@ function act_shutdown() function postact_logout() { // alert("postact_logout"); - try { + try { xstm.abort(); } catch (e) {} @@ -552,7 +552,7 @@ function slowimg(img,x1,y1,deltat,free,action,srcend) { } slowimg.prototype = { - img: null, + img: null, st: null, x0: 0, y0: 0, @@ -569,20 +569,20 @@ slowimg.prototype = { tout: 0, action: null, srcend: null, - + setstart: function(x0,y0) { this.x0 = x0; this.y0 = y0; }, - + setaction: function(act) { this.action = act; }, - - settime: function(time) + + settime: function(time) { this.time = (time < this.deltat ? this.deltat : time); this.step_n = parseInt(this.time / this.deltat); @@ -595,17 +595,17 @@ slowimg.prototype = { this.step_free = parseInt(this.step_n * this.free); } }, - + start: function(st) { // $("logz").innerHTML += " xxxxxxxxxxxxxxxxxxxxxSTART
"; this.st = st; this.st.st_loc_new++; - + this.img.style.visibility = "visible"; setTimeout(function(obj){ obj.animate(); }, this.deltat, this); }, - + animate: function() { // $("log").innerHTML = "Val " + this.step_cur + " N: " + this.step_n + "
"; @@ -822,11 +822,11 @@ function notify_ex(st, text, tout, butt, w, h, is_opa, block_time) { var clo, box; var t = this; - + this.st = st; this.ancestor = document.body; - + this.st.st_loc_new++; clo = document.createElement("input"); @@ -875,9 +875,9 @@ function notify_ex(st, text, tout, butt, w, h, is_opa, block_time) box.style.visibility = "visible"; this.notitag = box; - + this.ancestor.appendChild(box); - + this.toutid = setTimeout(function(obj){ obj.unblock(); }, tout, this); if (block_time != 0) { @@ -897,7 +897,7 @@ notify_ex.prototype = { notitag: null, toutid: null, clo: null, - clodiv: null, + clodiv: null, butt: null, tblkid: null, @@ -907,7 +907,7 @@ notify_ex.prototype = { this.st.st_loc++; } }, - + hide: function() { clearTimeout(this.toutid); @@ -926,7 +926,7 @@ function notify(st, text, tout, butt, w, h) { notify_ex.call(this, st, text, tout, butt, w, h, false, 0); } - + function globst() { this.st = -1; this.st_loc = -1; @@ -961,7 +961,7 @@ globst.prototype = { function remark_step() { var ct = $("remark").l_remct; - + if (ct != 0) { ct++; if (ct > 2) @@ -972,7 +972,7 @@ function remark_step() } else $("remark").className = "remark0"; - + return; } @@ -994,7 +994,7 @@ function remark_off() function italizer(ga) { var pre, pos; - if (ga[0] & 2) + if (ga[0] & 2) return ""+ga[1]+""; else return ga[1]; @@ -1054,7 +1054,7 @@ function user_dec_and_state(el) content = user_decorator(el, true); content += state_add(el[0],(typeof(el[2]) != 'undefined' ? el[2] : null)); - + return (content); } @@ -1089,7 +1089,7 @@ function chatt_sub(dt,data,str) } // $("txt").innerHTML; - + if (must_scroll) { $("txt").scrollTop = 10000000; } @@ -1131,24 +1131,24 @@ function onbeforeunload_cb () { } function onunload_cb () { - + if (typeof(xstm) != "undefined") xstm.the_end = true; act_shutdown(); - + return(false); } function room_checkspace(emme,tables,inpe) { nome = ""; - for (i = 0 ; i < emme ; i++) + for (i = 0 ; i < emme ; i++) nome += "m"; nome += ""; alta = ""; - for (i = 0 ; i < 5 ; i++) + for (i = 0 ; i < 5 ; i++) alta += nome+"
"; for (i = 0 ; i < tables ; i++) { @@ -1186,7 +1186,7 @@ function unescapeHTML(cont) { var length = div.childNodes.length, results = new Array(length); while (length--) results[length] = div.childNodes[length]; - + for (i=0 ; i