       color: span_color
       'font-size': font_size
       'font-weight': font_weight
-    ).data('uid', uid).appendTo($container)
+    ).data('id', id).appendTo($container)
 
     span_left_end = $span.width() * (-1)
     trajectory_length = parseInt($span.css('left'))

$(document).on 'contextmenu', '.danmakuspan', (event) ->
  event.preventDefault()
  $self = $(event.currentTarget)
  target_uid = $self.data('uid')
  text = $self.text()
  return if not target_uid
  message = "“#{text}”\nAre you sure you want to report this danmaku?"
  option = confirm(message)
  return if option != true
  danmaku.report(target_uid)
  $self.trigger('click')

$(document).on 'ready', ->

    self = this
    $container = $('#container')

    id = attributes.id
    top = if attributes.top == undefined then Math.random() else attributes.top
    color = attributes.color || [255, 255, 255, 0.9]
    size = if self.size then self.size else (attributes.size || 1.0)
