 checkBrowserSupport = ->
   is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1
   is_android = navigator.userAgent.toLowerCase().indexOf('android') > -1
-  if (is_firefox and is_android) 
+  if (is_firefox and is_android)
     showAlertUnsupported()
+
+appendDIV = (data, parent) ->
+  div = document.createElement('div')
+  div.innerHTML = data
+  chatOutput = document.getElementById('chat-output')
+  fileProgress = document.getElementById('file-progress')
+  if (!parent)
+    chatOutput.insertBefore(div, chatOutput.firstChild)
+  else
+    fileProgress.insertBefore(div, fileProgress.firstChild)
+  div.tabIndex = 0
+  div.focus()
+  chatInput.focus()
+
 
 $ ->
   checkWebRTCSupport()

        initConnection()
        connection.open()
        window.isRoomInitiator = true

showAlertUnsupported = ->
  $('.js-no-webrtc').removeClass('hide').show()
  $('.js-accept-webrtc').hide()

checkWebRTCSupport = ->
