forked from rDrama/rDrama
1
0
Fork 0

enable ctrl+enter to change private chat name

master
Aevann 2024-03-10 21:25:41 +02:00
parent 23b8e07aa9
commit dc0f6d0655
1 changed files with 3 additions and 1 deletions

View File

@ -121,7 +121,7 @@ function postToastSwitch(t, url, button1, button2, cls, extraActionsOnSuccess) {
});
}
if (!location.pathname.endsWith('/submit') && !location.pathname.startsWith('/chat'))
if (!location.pathname.endsWith('/submit') && location.pathname != '/chat')
{
document.addEventListener('keydown', (e) => {
if (!((e.ctrlKey || e.metaKey) && e.key === "Enter")) return;
@ -129,6 +129,8 @@ if (!location.pathname.endsWith('/submit') && !location.pathname.startsWith('/ch
const targetDOM = document.activeElement;
if (!(targetDOM instanceof HTMLTextAreaElement || targetDOM instanceof HTMLInputElement)) return;
if (targetDOM && targetDOM.id == 'input-text-chat') return;
const formDOM = targetDOM.parentElement;
if (formDOM.id == 'note_section') {