Skip to content

Instantly share code, notes, and snippets.

@AlanBreck
Last active January 21, 2016 23:36
Show Gist options
  • Save AlanBreck/924ae5c546c02d7a4968 to your computer and use it in GitHub Desktop.
Save AlanBreck/924ae5c546c02d7a4968 to your computer and use it in GitHub Desktop.
Code Snippets
window.console.log = function ( output ) {
if ( typeof output == "Array" || typeof output === "Object" )
output = JSON.stringify( output, null, 2 );
document.getElementById( "console" ).innerHTML += output + "\n";
};
window.console.log=function(e){var n=document.getElementById("console");null==n&&(n=document.createElement("pre"),n.setAttribute("id","console")),("Array"==typeof e||"Object"==typeof e)&&(e=JSON.stringify(e,null,2)),n.innerHTML+=e+"\n",document.body.appendChild(n)};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment