Skip to content

Commit

Permalink
Added Ctrl-x key comobo toclose and save document, by triggering a mo…
Browse files Browse the repository at this point in the history
…usedown on the #save_button selector
  • Loading branch information
turnermm committed Feb 20, 2022
1 parent 0b579ae commit 16773b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions locktimer.js
Expand Up @@ -15,6 +15,9 @@


function handlekeypress (e) {
if( e.data.keyCode == CKEDITOR.CTRL + 88) {
jQuery("#save_button").trigger("mousedown");
}
if(ourLockTimerIsSet) {
lockTimerRefresh();
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/parse_wiki.js.unc
Expand Up @@ -1928,7 +1928,7 @@ function parse_wikitext(id) {

jQuery(document).ready(function() {
var edit__summary = false;
jQuery(document).on("keypress", "input#edit__summary", function(e) {
jQuery(document).on("keydown", "input#edit__summary", function(e) {
if (e.which == 13) {
edit__summary = true;
jQuery("#save_button").trigger("mousedown");
Expand Down

0 comments on commit 16773b6

Please sign in to comment.