diff options
author | Aaron Parecki <aaron@parecki.com> | 2014-09-15 09:22:54 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2014-09-15 09:22:54 -0700 |
commit | 3f090eeb306dec5041d3c2c3b6baa3434f31802b (patch) | |
tree | 42a1658e3bee38ab257587b6f8d006f9879a67e9 /views | |
parent | d6470f1872f12b09a130a818c2818ee3389461c8 (diff) |
add ctrl-s keyboard shortcut
Diffstat (limited to 'views')
-rw-r--r-- | views/new-bookmark.php | 7 | ||||
-rw-r--r-- | views/new-post.php | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/views/new-bookmark.php b/views/new-bookmark.php index 5738036..d4100ba 100644 --- a/views/new-bookmark.php +++ b/views/new-bookmark.php @@ -62,6 +62,13 @@ <script> $(function(){ + // ctrl-s to save + $(window).on('keydown', function(e){ + if(e.keyCode == 83 && e.ctrlKey){ + $("#btn_post").click(); + } + }); + $("#btn_post").click(function(){ var syndications = []; diff --git a/views/new-post.php b/views/new-post.php index 5221dc8..fa7b9bc 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -102,6 +102,13 @@ <script> $(function(){ + // ctrl-s to save + $(window).on('keydown', function(e){ + if(e.keyCode == 83 && e.ctrlKey){ + $("#btn_post").click(); + } + }); + $("#btn_post").click(function(){ var syndications = []; |