master
Aevann1 2022-03-22 16:50:01 +02:00
parent c10ac7ad36
commit 762cb277ce
1 changed files with 10 additions and 2 deletions

View File

@ -26,7 +26,8 @@
<a href="" class="font-weight-bold text-black userlink" target="_blank"></a>
<div style="overflow:hidden">
<span class="chat-message text-black text-break"></span>
<button class="quote-btn btn d-inline-block pt-0"><i class="fas fa-reply" aria-hidden="true"></i></button>
<span class="text d-none"></span>
<button class="quote-btn btn d-inline-block pt-0" onclick="quote2()"><i class="fas fa-reply" aria-hidden="true"></i></button>
</div>
</div>
</div>
@ -174,7 +175,7 @@
document.getElementsByClassName('userlink')[0].href = '/@' + json['username']
document.getElementsByClassName('userlink')[0].innerHTML = json['username']
document.getElementsByClassName('userlink')[0].style.color = '#' + json['namecolor']
document.getElementsByClassName('quote-btn')[0].addEventListener('click', function() {quote(text)})
document.getElementsByClassName('text')[0].innerHTML = text
document.getElementsByClassName('chat-message')[0].innerHTML = text_html
document.getElementById('chat-text').append(document.getElementsByClassName('chat-line')[0].cloneNode(true))
if (scrolled_down) box.scrollTo(0, box.scrollHeight)
@ -199,6 +200,13 @@
textbox.focus()
}
function quote2() {
textbox.style.height = '80px'
text = document.getElementsByClassName('text')[0].innerHTML
textbox.value = '> ' + text + '\n\n'
textbox.focus()
}
textbox.addEventListener("keyup", function(e) {
if (!e.shiftKey && e.key === 'Enter') {
e.preventDefault();