CTRL+Enter for new posts.

This commit is contained in:
skobkin 2014-03-19 18:55:21 -07:00
parent f5af75cdc6
commit dd238b43e0

View file

@ -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