         to   = to
         niceify to - from
 
-  # Chrome apps open links in a new browser window. OAuth authentication
-  # relies on `window.opener` to be present to communicate back to the
-  # parent window, which isn't available in a chrome app. Therefore, we
-  # disable/change oauth behavior based on this flag: SA.
-  oauthEnabled: -> window.name isnt "chromeapp"
-
   hasPermission: (name) ->
 
     (KD.config.permissions.indexOf name) >= 0

      else
        null

  getDummyName:->
    u  = KD.utils
    gr = u.getRandomNumber
    gp = u.generatePassword
    gp(gr(10), yes)

  generateDummyUserData:->

    u  = KD.utils

    uniqueness = (Date.now()+"").slice(6)
    return formData   =
      agree           : "on"
      email           : "sinanyasar+#{uniqueness}@gmail.com"
      firstName       : u.getDummyName()
      lastName        : u.getDummyName()
      # inviteCode      : "twitterfriends"
      password        : "123123123"
      passwordConfirm : "123123123"
      username        : uniqueness

  registerDummyUser:->

    return if location.hostname is "koding.com"

    u  = KD.utils

    KD.remote.api.JUser.register u.generateDummyUserData(), => location.reload yes

  startRollbar: ->
    @replaceFromTempStorage "_rollbar"


  warnAndLog: (msg, params)->
    warn msg, params
    ErrorLog.create msg, params

  # Version Compare
  # https://github.com/balupton/bal-util/blob/master/src/lib/compare.coffee
