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

Merge pull request #184 from Potatochips2001/master

Update client.js
This commit is contained in:
marzavec 2022-10-25 13:44:38 -07:00 committed by GitHub
commit 2fac02d430
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,