CTRL+S Shortcut

http://hackforums.net/showthread.php?tid=5207086

Fra 19.03.2016. Se den seneste versjonen.

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        CTRL+S Shortcut
// @namespace   Shortcut
// @description http://hackforums.net/showthread.php?tid=5207086
// @include     *hackforums.net/showthread.php?tid=*
// @require     http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
// @version     0.1
// @grant       GM_getValue
// ==/UserScript==

$(document).on("keydown", function(e){
    if (e.ctrlKey && e.which === 83) {
        if ($("#message").val() === "") {
			$(document).scrollTop(10000);
		} else {
			$("#quick_reply_submit").click();
		}
        e.preventDefault();
        return false;
    }
});