whoops; Neopia uses ImpressUser, so make sure it can access it
This commit is contained in:
parent
fb123b6d64
commit
8a61280320
1 changed files with 58 additions and 56 deletions
|
@ -1,6 +1,24 @@
|
|||
/** @jsx React.DOM */
|
||||
|
||||
var Neopia = {
|
||||
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 = {
|
||||
User: {
|
||||
get: function(id) {
|
||||
return $.ajax({
|
||||
|
@ -53,25 +71,7 @@ var Neopia = {
|
|||
}
|
||||
Neopia.API_URL = "http://" + host + "/api/1";
|
||||
}
|
||||
};
|
||||
|
||||
(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 userSignedIn = ($('meta[name=user-signed-in]').attr('content') === 'true');
|
||||
|
@ -384,4 +384,6 @@ var Neopia = {
|
|||
});
|
||||
|
||||
Modeling.init($);
|
||||
|
||||
return Neopia;
|
||||
})(jQuery, ModelingI18n);
|
||||
|
|
Loading…
Reference in a new issue