whoops; Neopia uses ImpressUser, so make sure it can access it

This commit is contained in:
Matchu 2015-07-27 13:33:15 -04:00
parent fb123b6d64
commit 8a61280320

View file

@ -1,5 +1,23 @@
/** @jsx React.DOM */ /** @jsx React.DOM */
var Neopia = (function($, I18n) {
// 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 = { var Neopia = {
User: { User: {
get: function(id) { get: function(id) {
@ -55,24 +73,6 @@ var Neopia = {
} }
}; };
(function($, I18n) {
// 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 ImpressUser = (function() { var ImpressUser = (function() {
var userSignedIn = ($('meta[name=user-signed-in]').attr('content') === 'true'); var userSignedIn = ($('meta[name=user-signed-in]').attr('content') === 'true');
if (userSignedIn) { if (userSignedIn) {
@ -384,4 +384,6 @@ var Neopia = {
}); });
Modeling.init($); Modeling.init($);
return Neopia;
})(jQuery, ModelingI18n); })(jQuery, ModelingI18n);