           ), 3000
         x.show()
 
-
-window.NotificationCenter =
-  create: ->
-    that = this
-
   enableNotification: (cb) ->
     return unless window.webkitNotifications
-    that = this
     permission = window.webkitNotifications.checkPermission()
     unless permission is 0
-      window.webkitNotifications.requestPermission ->
-        that.settings.disableNotification = false
+      window.webkitNotifications.requestPermission =>
+        @settings.disableNotification = false
         cb() if $.isFunction(cb)
     else
-      that.settings.disableNotification = false
+      @settings.disableNotification = false
       cb()  if $.isFunction(cb)
     false
-

    disableNotification: false

  constructor: (@wireroom, @options) ->
    that = this
    ifSupport = (allowed) =>
      console.log "Notification is supported."
      # $("#window-notification").bind "change", (e) ->

      #   else if e.target.value is "off"
      #     @disableNotification()
      @wireroom.socket.on "says", (message) =>
        return if new Date() - @wireroom.BootTime < 3000 or @settings.disableNotification or
          message.ident is @wireroom.Identifier
        @showNotification "/images/opmsg48x48.jpg", message.nickname + " says", message.message
