Skip to content

Instantly share code, notes, and snippets.

@ninjapanzer
Created July 17, 2013 18:26
Show Gist options
  • Save ninjapanzer/6023103 to your computer and use it in GitHub Desktop.
Save ninjapanzer/6023103 to your computer and use it in GitHub Desktop.
Nice console snipet
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