Created
July 17, 2013 18:26
-
-
Save ninjapanzer/6023103 to your computer and use it in GitHub Desktop.
Nice console snipet
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 (typeof(console) !== 'undefined') { | |
if ('debug' in console) { | |
console.debug('Hey, you have your debugger enabled :)'); | |
} else { | |
console.log('Hey, you have your IE debugger enabled :-/'); | |
} | |
} else { | |
var Console = Class.create(); | |
Console.prototype = { | |
initialize: function() {}, | |
info: function(){}, | |
error: function(){}, | |
debug: function(){}, | |
warning: function(){}, | |
log: function(){} | |
}; | |
var console = new Console(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment