Skip to content

Instantly share code, notes, and snippets.

@rjmcguire
Created April 19, 2013 08:01
Show Gist options
  • Save rjmcguire/5418831 to your computer and use it in GitHub Desktop.
Save rjmcguire/5418831 to your computer and use it in GitHub Desktop.
debug plugin for baldrickjs
(function(baldrick){
oldlogger = baldrick.prototype.log
baldrick.prototype.log = function(message,element,event) {
oldlogger(message,element,event)
if(console){
console.log(message);
if(element){
console.log('Trigger Element:');
console.log(element);
}
if(event){
console.log('Event:');
console.log(event);
}
}else{
alert(message);
}
}
})(baldrick);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment