forked from rDrama/rDrama
1
0
Fork 0

make "reply" button a "quote" button

master
Aevann 2023-03-21 20:13:53 +02:00
parent 39cedb5f2d
commit 4e7a9dc37b
1 changed files with 12 additions and 15 deletions

View File

@ -52,10 +52,8 @@ function getSelectionTextHtml() {
function toggleReplyBox(id) {
const element = document.getElementById(id);
const ta = element.getElementsByTagName('textarea')[0]
element.classList.toggle('d-none')
element.classList.remove('d-none')
if (!element.classList.contains('d-none'))
{
let text = getSelection().toString().trim()
if (text)
{
@ -70,7 +68,6 @@ function toggleReplyBox(id) {
if (!ta.value.endsWith('\n')) ta.value += '\n'
}
ta.focus()
}
autoExpand(ta);
}