Created
July 27, 2012 15:24
-
-
Save bforrest/3188643 to your computer and use it in GitHub Desktop.
console log javascript snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!window.console) { | |
(function() { | |
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", | |
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; | |
window.console = {}; | |
for (var i = 0; i < names.length; ++i) { | |
window.console[names[i]] = function() {}; | |
} | |
}()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment