Created
May 20, 2017 20:53
-
-
Save gordonkristan/09440784dd3ba3e5c142ec59f35c3ba8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(function(console) { | |
var methods = [ | |
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', | |
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', | |
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', | |
'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' | |
]; | |
if (!console.log) { | |
console.log = function() {}; | |
} | |
var methodsCount = methods.length; | |
for (var i = 0; i < methodsCount; ++i) { | |
var methodName = methods[i]; | |
if (!console[methodName]) { | |
console[methodName] = console.log; | |
} | |
} | |
})(window.console = window.console || {}); |
This file contains hidden or 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
!function(e){var o=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","markTimeline","profile","profileEnd","table","time","timeEnd","timeline","timelineEnd","timeStamp","trace","warn"];e.log||(e.log=function(){});for(var n=o.length,i=0;n>i;++i){var r=o[i];e[r]||(e[r]=e.log)}}(window.console=window.console||{}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment