/ Published in: JavaScript
IE doesn't like console.log. This fixes that.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// make it safe to use console.log always (function(a){function b(){}for(var c="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),d;!!(d=c.pop());){a[d]=a[d]||b;}}) (function(){try{console.log();return window.console;}catch(a){return (window.console={});}}());