From 92c5ac9505608504a33b757a2f0f1c1a0fcd86ad Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Thu, 26 Jul 2012 08:43:38 +0200 Subject: [PATCH] remove all js debug and add the g_debug variable --- web/commons.js | 6 +++--- web/index.php | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/web/commons.js b/web/commons.js index 711b086..d5c0c42 100644 --- a/web/commons.js +++ b/web/commons.js @@ -250,11 +250,11 @@ function send_mesg(mesg) // alert("xhr_wr: "+xhr_wr+" is_conn: "+is_conn); xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, (is_conn ? true : false)); xhr_wr.onreadystatechange = function() { return; }; - if (typeof(console) == 'object') { - if (typeof(console.log) == 'function') { + console.log(typeof(g_debug)); + if (typeof(g_debug) == 'number' && g_debug > 0 + && typeof(console) == 'object' && typeof(console.log) == 'function') { var ldate = new Date(); console.log(ldate.getTime()+':MESG:'+mesg); - } } xhr_wr.send(null); diff --git a/web/index.php b/web/index.php index 9fb6b3d..dfc671f 100644 --- a/web/index.php +++ b/web/index.php @@ -865,7 +865,7 @@ supported by:
- + @@ -878,13 +878,14 @@ supported by:
@@ -1012,6 +1013,7 @@ echo "$body"; ?>