Created
January 6, 2012 18:18
-
-
Save bastman/1571753 to your computer and use it in GitHub Desktop.
Basilicom.console.js
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
try { | |
if (!Basilicom) { | |
Basilicom = {}; | |
} | |
}catch(e) { | |
Basilicom = {}; | |
} | |
// +++++ Basilicom.console ++++++++++++ | |
if (!Basilicom.console) { | |
Basilicom.console = { | |
log : function(p1,p2) | |
{ | |
try { | |
var enabled = true; // inject by php isDebugMode() | |
if (enabled != true) { | |
return; | |
} | |
if (window.console) | |
{ | |
if (arguments.length>=2) | |
{ | |
window.console.log(p1,p2); | |
}else{ | |
console.log(p1); | |
} | |
} | |
}catch(e){ | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment