Only use console.log if debugging enabled
authorDarren <darren@darrenwhitlen.com>
Sun, 2 Sep 2012 01:01:10 +0000 (02:01 +0100)
committerDarren <darren@darrenwhitlen.com>
Sun, 2 Sep 2012 01:01:10 +0000 (02:01 +0100)
client_backbone/index.html
client_backbone/utils.js

index b9e5d2b7fa8ab637d50910f2a5de4fefa41e0e72..c5068251e1f62a797b45328779af8be765f54a87 100644 (file)
     <script src="view.js"></script>
 
 <script>
+    // Only debug if set in the querystring
+    if (!getQueryVariable('debug')) {
+        manageDebug(false);
+    } else {
+        manageDebug(true);
+    }
+    
     $(function () {
         kiwi.app = new kiwi.model.Application({container: $('#kiwi')});
     });
index 89e348f1dd990215dadbab3d5ed63f269ef8520b..f7a6494a29b813055bc7fe30fbe2109d080b6db2 100644 (file)
@@ -14,7 +14,6 @@ var kiwi = {};
 *   @param  {Boolean}   debug   Whether to re-enable console.log or not
 */
 function manageDebug(debug) {
-    return;
     var log, consoleBackUp;
     if (window.console) {
         consoleBackUp = window.console.log;