Add debug util functions to base.js.

This commit is contained in:
Max Goodman
2013-02-03 22:20:27 -08:00
committed by bsimpson63
parent 09a0f91ae9
commit 28d3388642

View File

@@ -5,6 +5,12 @@ r.setup = function(config) {
// Set the legacy config global
reddit = config
_.each(['debug', 'warn', 'error'], function(name) {
r[name] = config.debug && window.console && console[name]
? _.bind(console[name], console)
: function() {}
})
r.config.currentOrigin = location.protocol+'//'+location.host
r.analytics.breadcrumbs.init()
}