     ), 5000
 
 else if localStorage?
-  docname = window.location.pathname.split('/')[1]
   datastore = new DataStore.LocalStorageLazy docname
   doc = new Document datastore
 

$settingsDiv = $('#settings')
$modeDiv = $('#mode')

changeStyle = (theme) ->
  $('body').attr('id', theme)



  # render when ready
  $(document).ready ->
    document.title = "#{docname} - Vimflowy" unless docname is ''
    View.renderSession session

  key_handler = new KeyHandler session, key_bindings
