define(['jquery'], function ($) {
    var colors = {
        log: '#000000',
        warn: '#cc9900',
        error: '#cc0000'
    };
    
    var log = $('#log');
    
    if (!console) {
        console = {};
    }
    for (var name in colors) {
        var func = console[name] || function () {};
        
        console[name] = function () {
            func.apply(console, arguments);

            var line = $('<div>');
            log.append(line);
            for (var i = 0; i < arguments.length; i++) {
                var section = $('<span>');
                section.text(arguments[i]);
                line.append(section);
                line.css('color', colors[name]);
            }
        };
    }
    return console;
});

@@ -252,19 +252,8 @@
     
- var func =
  con
@@ -267,11 +267,11 @@
 me%5D 
-%7C%7C 
+= (
 func
@@ -280,13 +280,26 @@
 on (
+original, color
 ) %7B
-%7D;
 %0A   
@@ -307,32 +307,18 @@
     
-%0A   
     
- console%5Bname%5D =
+return
  fun
@@ -324,24 +324,28 @@
 nction () %7B%0A
+    
             
@@ -376,16 +376,20 @@
 ments);%0A
+    
 %0A       
@@ -389,24 +389,28 @@
             
+    
 var line = $
@@ -432,16 +432,20 @@
         
+    
 log.appe
@@ -462,24 +462,28 @@
             
+  
+  
 for (var i =
@@ -527,24 +527,28 @@
             
+    
 var section 
@@ -558,24 +558,28 @@
 ('%3Cspan%3E');%0A
+    
             
@@ -622,24 +622,28 @@
             
+    
 line.append(
@@ -652,16 +652,20 @@
 ction);%0A
+    
         
@@ -699,15 +699,8 @@
 olor
-s%5Bname%5D
 );%0A 
@@ -714,19 +714,85 @@
     
-%7D%0A        %7D
+    %7D%0A            %7D;%0A        %7D)(console%5Bname%5D %7C%7C function() %7B%7D, colors%5Bname%5D)
 ;%0A  

Improve console.js scripts to better scope their arguments.