mirror of
https://bitbucket.org/skobkin/chrome_point_plus.git
synced 2024-11-23 18:56:04 +00:00
CTRL+Enter for new posts.
This commit is contained in:
parent
f5af75cdc6
commit
dd238b43e0
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue