/
// https://www.paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};
/
/
// https://gist.github.com/bgrins/5108712
(function(){var method;var noop=function(){};var methods=['assert','clear','count','debug','dir','dirxml','error','exception','group','groupCollapsed','groupEnd','info','log','markTimeline','profile','profileEnd','table','time','timeEnd','timeStamp','trace','warn'];var length=methods.length;var console=(window.console=window.console||{});while(length--){method=methods[length];if(!console[method]){console[method]=noop;}};if(Function.prototype.bind){window.log=Function.prototype.bind.call(console.log,console);}else{window.log=function(){Function.prototype.apply.call(console.log,console,arguments);};}})();
/
/
// https://stackoverflow.com/questions/13815640/a-proper-wrapper-for-console-log-with-correct-line-number#18939803
// debug.log('wat', 'Yay custom levels.');debug.info('This is info.');debug.error('Bad stuff happened.');
function set_debug(is_debug){if(is_debug){window.debug={log:window.console.log.bind(window.console,'%s: %s'),error:window.console.error.bind(window.console,'error: %s'),info:window.console.info.bind(window.console,'info: %s'),warn:window.console.warn.bind(window.console,'warn: %s')};}else{var no_op=function(){};window.debug={log:__no_op,error:no_op,warn:__no_op,info:__no_op}}}
set_debug(true);
/
2320 shaares