mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 08:48:18 -05:00
Add debug util functions to base.js.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user