Skip to content

Instantly share code, notes, and snippets.

@matt212
Last active May 12, 2018 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matt212/92a97f882ba16ecc0dde4ebdb8188384 to your computer and use it in GitHub Desktop.
Save matt212/92a97f882ba16ecc0dde4ebdb8188384 to your computer and use it in GitHub Desktop.
console 2 html for jsfiddle
!function(o){console.old=console.log,console.log=function(){var n,e,t="";for(e=0;e<arguments.length;e++)t+='<span class="log-'+typeof(n=arguments[e])+'">',"object"==typeof n&&"object"==typeof JSON&&"function"==typeof JSON.stringify?t+=JSON.stringify(n):t+=n,t+="</span>&nbsp;";o.innerHTML+=t+"<br>",console.old.apply(void 0,arguments)}}
(document.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment