 			$(@).after(el)
 			$(@).remove()
 		@restoreSelection()
-	detectChanged: ->
+	detectContentsChanged: ->
 			title = $('#editor-title').html()
 			content = $('#editor').html()
 			if @lastTitle != title || @lastContent != content
 				@setChanged true
 				@lastTitle = title
 				@lastContent = content
-
-	
 
 	autosave: (durationInMilliseconds=5000)->
 		(update= =>

		$('#editor-title').on 'keydown', (e)=>
			@handleTitleKeyDown(e)
		.on 'keyup', (e)=>
			@detectChanged()
			@handleTitleKeyUp(e)
		.on 'paste', (e)=>
			self = @

			@handleKeyDown(e)
			@update()
		.on 'keyup', (e)=>
			@detectContentsChanged()
			@handleKeyUp(e)
			@update()
			@checkEmpty()
