cloudlatex keyboard shortcuts

ctrl+s = save, ctrl + b = compile

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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         cloudlatex keyboard shortcuts
// @namespace    zeicold
// @version      0.1
// @description  ctrl+s = save, ctrl + b = compile
// @author       Zeicold
// @match        https://cloudlatex.io/*
// @grant        none
// ==/UserScript==

$(document).on("keydown", function(e){
    if (e.ctrlKey && e.which === 83) {
        var save=w2ui.myToolbar;
        if (save) save.click('item0', event);
		e.preventDefault();
        return false;
    }
    if (e.ctrlKey && e.which === 66) {
        var compile=w2ui.myToolbar;
        if (compile) compile.click('item1', event);
		e.preventDefault();
        return false;
    }
});