 
     KodingAppsController.compileAppOnServer JSEditor.getData()?.path, ->
       log "COMPILE", arguments
+
+  toggleLiveReload:(state)->
+
+    if state?
+    then @liveMode = state
+    else @liveMode = !@liveMode
+
+    new KDNotificationView
+      title: if @liveMode then 'Live compile enabled' \
+                          else 'Live compile disabled'
+
+    @storage.setValue 'liveMode', @liveMode
+    return  unless @liveMode
+
+    KD.utils.defer =>
+      @previewApp yes; @previewCss yes
 
 class DevToolsEditorPane extends CollaborativeEditorPane
 

            _.debounce (@lazyBound 'previewCss', no), 500

          CSSEditor.on "RunRequested", @lazyBound 'previewCss', yes
          CSSEditor.on "AutoRunRequested", toggleAutoRun


  previewApp:(force = no)->

    toggleLiveReload = new KDView
      partial : "<span>#{itemLabel}</span>"
      click   : =>
        @toggleLiveReload()
        menu.contextMenu.destroy()

    toggleLiveReload.on "viewAppended", ->
      toggleLiveReload.parent.setClass "default"
