From: Matteo Nastasi (mop) Date: Tue, 9 Jul 2013 05:40:32 +0000 (+0200) Subject: script to detect active console.log calls and mods to avoid false positives X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=b4e529bf31290ec95617d4060d214e835e8bb378;p=brisk.git script to detect active console.log calls and mods to avoid false positives --- diff --git a/bin/console_log_list.sh b/bin/console_log_list.sh new file mode 100755 index 0000000..c312dc6 --- /dev/null +++ b/bin/console_log_list.sh @@ -0,0 +1,2 @@ +#!/bin/bash +grep -r console.log web/* | grep -v ': *//' | grep -v '// OK$' | grep -v '/* console.log' diff --git a/web/commons.js b/web/commons.js index be7cac3..4c0dbcf 100644 --- a/web/commons.js +++ b/web/commons.js @@ -281,9 +281,9 @@ function send_mesg(mesg) xhr_wr.setRequestHeader("If-Modified-Since", new Date().toUTCString()); xhr_wr.onreadystatechange = function() { return; }; if (typeof(g_debug) == 'number' && g_debug > 0 - && typeof(console) == 'object' && typeof(console.log) == 'function') { + && typeof(console) == 'object' && typeof(console.log) == 'function') { // OK var ldate = new Date(); - console.log(ldate.getTime()+':MESG:'+mesg); + console.log(ldate.getTime()+':MESG:'+mesg); // OK } xhr_wr.send(null); diff --git a/web/myconsole.js b/web/myconsole.js index 223abdc..170220a 100644 --- a/web/myconsole.js +++ b/web/myconsole.js @@ -114,7 +114,7 @@ function log_walk(curtag) var ind = 0; var ancestor = curtag; do { - console.log(spcs("_", "+", ind)+" ["+curtag.tagName+"] nodeType: "+curtag.nodeType+" inner: ["+curtag.innerHTML+"]"); + console.log(spcs("_", "+", ind)+" ["+curtag.tagName+"] nodeType: "+curtag.nodeType+" inner: ["+curtag.innerHTML+"]"); // OK if (curtag.firstChild != null && curtag.tagName != "TD") { ind += 2; curtag = curtag.firstChild; diff --git a/web/xynt-streaming.js b/web/xynt-streaming.js index 11f4f22..79159be 100644 --- a/web/xynt-streaming.js +++ b/web/xynt-streaming.js @@ -730,7 +730,7 @@ xynt_streaming.prototype = { log: function (s) { if (this.console != null) { - return (this.console.log(s)); + return (this.console.log(s)); // OK } } }