 
 # constant
 MAX_PACKET_NUMBER = 128
-
-$('#font-awesome')?.setAttribute 'href', "#{ROOT}/components/font-awesome/css/font-awesome.min.css"
+APPDATA = path.join(window.APPDATA_PATH, 'battle-detail');
+fs.mkdir APPDATA, (error) ->
+  return if !error
+  return if error.code == 'EEXIST'
+  console.error(error)
 
 updateNonce = (nonce) ->
   if typeof nonce == "number" and nonce > 0

{React, ReactDOM, ReactBootstrap} = window
ModalArea = require './modal-area'
OptionArea = require './option-area'

  packet.poi_timestamp = timestamp
  packet.poi_comment = comment

savePacket = (packet) ->
  setTimeout (->
    return unless packet? and packet.poi_timestamp?
    filename = packet.poi_timestamp
    file = path.join(APPDATA, "#{filename}.json")
    data = JSON.stringify(packet)
    fs.writeFile file, data, (error) ->
      return unless error
      console.error error
  ), 0


MainArea = React.createClass
  componentDidMount: ->
