Skip to content

Instantly share code, notes, and snippets.

@bastman
Created January 6, 2012 18:18
Show Gist options
  • Save bastman/1571753 to your computer and use it in GitHub Desktop.
Save bastman/1571753 to your computer and use it in GitHub Desktop.
Basilicom.console.js
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