From ab3a1eaf8f4870f1dfee2a391469969c6257cba3 Mon Sep 17 00:00:00 2001 From: Zach Wise Date: Wed, 2 May 2012 16:04:24 -0500 Subject: [PATCH] added debug mode --- source/js/VMM.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/source/js/VMM.js b/source/js/VMM.js index cf3ab34..84ad589 100644 --- a/source/js/VMM.js +++ b/source/js/VMM.js @@ -90,6 +90,10 @@ if (typeof VMM == 'undefined') { //var VMM = {}; var VMM = Class.extend({}); + /* Debug + ================================================== */ + VMM.debug = true; + /* Master Config ================================================== */ @@ -229,12 +233,14 @@ if (typeof VMM == 'undefined') { /* Trace (console.log) ================================================== */ function trace( msg ) { - if (window.console) { - console.log(msg); - } else if ( typeof( jsTrace ) != 'undefined' ) { - jsTrace.send( msg ); - } else { - //alert(msg); + if (VMM.debug) { + if (window.console) { + console.log(msg); + } else if ( typeof( jsTrace ) != 'undefined' ) { + jsTrace.send( msg ); + } else { + //alert(msg); + } } }