1
0
mirror of https://github.com/hack-chat/main.git synced 2024-03-22 13:20:33 +08:00

Update client.js

This commit is contained in:
Potatochips2001 2022-10-14 03:47:42 -04:00 committed by GitHub
parent ac90041ebb
commit c5b0a58518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,14 @@
*
*/
//select "chatinput" on "/"
document.addEventListener("keydown", e => {
if (e.key === '/' && document.getElementById("chatinput") != document.activeElement) {
e.preventDefault();
document.getElementById("chatinput").focus();
}
});
// initialize markdown engine
var markdownOptions = {
html: false,