From dd238b43e0789bb11910ea0e6e985690d80c52f3 Mon Sep 17 00:00:00 2001 From: skobkin Date: Wed, 19 Mar 2014 18:55:21 -0700 Subject: [PATCH] CTRL+Enter for new posts. --- chrome_point_plus/js/point-plus.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/chrome_point_plus/js/point-plus.js b/chrome_point_plus/js/point-plus.js index 8a9d7b6..c9bce50 100644 --- a/chrome_point_plus/js/point-plus.js +++ b/chrome_point_plus/js/point-plus.js @@ -34,13 +34,20 @@ $(document).ready(function() { // Hotkeys // Send by CTRL+Enter if (options.option_ctrl_enter == true) { + // Reply $('.reply-form textarea').keydown(function(e) { - //e.preventDefault(); if (e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)) { e.preventDefault(); $(this).parent('.reply-form').submit(); } }); + // New post + $('#new-post-form #text-input,#new-post-form #tags-input').keydown(function(e) { + if (e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)) { + e.preventDefault(); + $(this).parent('#new-post-form').submit(); + } + }); } // Look and feel // Fluid #main layout