Zabbix submit acknowledgement with Ctrl-Enter

Adds the standard "save and go" keyboard shortcut

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Zabbix submit acknowledgement with Ctrl-Enter
// @namespace    http://wosc.de/
// @version      1.0
// @description  Adds the standard "save and go" keyboard shortcut
// @author       Wolfgang Schnerring
// @match        http://*/zabbix/zabbix.php?*action=acknowledge*
// @grant        none
// ==/UserScript==

(function() {
'use strict';

var $ = window.jQuery;

$('textarea').on('keydown', function(event) {
  if (! (event.which == 13 && event.ctrlKey)) return;

  event.preventDefault();
  $(event.target).closest('form').find('button[value="acknowledge.create"]').click();
});

})();