better console polyfill scoping
This commit is contained in:
parent
813cfbddea
commit
eede0b0718
1 changed files with 17 additions and 16 deletions
|
@ -1,22 +1,23 @@
|
|||
/** @jsx React.DOM */
|
||||
|
||||
// Console-polyfill. MIT license.
|
||||
// https://github.com/paulmillr/console-polyfill
|
||||
// Make it safe to do console.log() always.
|
||||
(function (con) {
|
||||
'use strict';
|
||||
var prop, method;
|
||||
var empty = {};
|
||||
var dummy = function() {};
|
||||
var properties = 'memory'.split(',');
|
||||
var methods = ('assert,count,debug,dir,dirxml,error,exception,group,' +
|
||||
'groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,' +
|
||||
'time,timeEnd,trace,warn').split(',');
|
||||
while (prop = properties.pop()) con[prop] = con[prop] || empty;
|
||||
while (method = methods.pop()) con[method] = con[method] || dummy;
|
||||
})(window.console = window.console || {});
|
||||
|
||||
(function($) {
|
||||
// Console-polyfill. MIT license.
|
||||
// https://github.com/paulmillr/console-polyfill
|
||||
// Make it safe to do console.log() always.
|
||||
var console = (function (con) {
|
||||
'use strict';
|
||||
var prop, method;
|
||||
var empty = {};
|
||||
var dummy = function() {};
|
||||
var properties = 'memory'.split(',');
|
||||
var methods = ('assert,count,debug,dir,dirxml,error,exception,group,' +
|
||||
'groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,' +
|
||||
'time,timeEnd,trace,warn').split(',');
|
||||
while (prop = properties.pop()) con[prop] = con[prop] || empty;
|
||||
while (method = methods.pop()) con[method] = con[method] || dummy;
|
||||
return con;
|
||||
})(window.console || {});
|
||||
|
||||
var Neopia = {
|
||||
User: {
|
||||
get: function(id) {
|
||||
|
|
Loading…
Reference in a new issue