diff --git a/boards/static/js/form.js b/boards/static/js/form.js --- a/boards/static/js/form.js +++ b/boards/static/js/form.js @@ -1,5 +1,3 @@ -var isCompact = false; - $('input[name=image]').wrap($('
')); $('body').on('change', 'input[name=image]', function(event) { @@ -19,4 +17,11 @@ var isCompact = false; fileReader.readAsDataURL(file); } +}); + +var form = $('#form'); +$('textarea').keypress(function(event) { + if (event.which == 13) { + form.submit(); + } }); \ No newline at end of file diff --git a/boards/static/js/thread_update.js b/boards/static/js/thread_update.js --- a/boards/static/js/thread_update.js +++ b/boards/static/js/thread_update.js @@ -25,7 +25,6 @@ var wsUser = ''; -var loading = false; var unreadPosts = 0; var documentOriginalTitle = ''; @@ -94,8 +93,6 @@ function getThreadDiff() { var post = $(postText); updatePost(post) - - lastPost = post; } var updatedPosts = data.updated; @@ -297,8 +294,7 @@ function showAsErrors(form, text) { form.children('.form-errors').remove(); if (text.length > 0) { - var errorList = $('