forked from rDrama/rDrama
enable ctrl+enter to change private chat name
parent
23b8e07aa9
commit
dc0f6d0655
|
@ -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') {
|
||||
|
|
Loading…
Reference in New Issue