if(!window.console){
var names = [ "log", "debug", "info", "warn", "error", "assert", "dir", "dirxml","group", "groupEnd", "time", "timeEnd", "count ", "trace", "profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; i ){
window.console[names[i]] = function() {};
}
}
can be placed in the basic library. Of course, pay attention to the scope of names and i ~