fix issues with chat

master
Aevann1 2022-08-26 16:53:56 +02:00
parent aa2c18a81d
commit fdf8d0511f
2 changed files with 7 additions and 4 deletions

View File

@ -80,7 +80,6 @@ socket.on('speak', function(json) {
document.getElementsByClassName('userlink')[0].href = '/@' + json['username']
document.getElementsByClassName('userlink')[0].style.color = '#' + json['namecolor']
document.getElementsByClassName('time')[0].classList.remove('d-none')
document.getElementsByClassName('time')[0].innerHTML = 'just now'
}
document.getElementsByClassName('userlink')[0].innerHTML = json['username']
@ -110,7 +109,7 @@ function quote(t) {
text = t.previousElementSibling.innerHTML.replace(/>/g, "> ").replace(/\n/g, "\n> ").replace(/\*/g,"\\*")
let username
try {username = t.parentElement.previousElementSibling.previousElementSibling.innerHTML}
catch(e) {username = t.parentElement.parentElement.previousElementSibling.previousElementSibling.innerHTML}
catch(e) {username = t.parentElement.previousElementSibling.innerHTML}
textbox.value = '> ' + text + '\n@' + username + ' '
textbox.focus()
autoExpand(textbox);

View File

@ -66,6 +66,10 @@
display: inline-block;
}
blockquote {
margin-top: 0.5rem !important;
}
.diff {
margin-top: 1rem;
}
@ -136,7 +140,7 @@
<div>
<img class="avatar pp20 mr-1" data-toggle="tooltip" data-placement="right">
<a href="" class="font-weight-bold text-black userlink" target="_blank"></a>
<span class="text-black time ml-2 d-none"></span>
<span class="text-black time ml-2 d-none">just now</span>
<div class="cdiv">
<span class="chat-message text-black text-break"></span>
<span class="text d-none"></span>
@ -209,6 +213,6 @@
<script src="{{asset('js/lozad.js')}}"></script>
<script src="/assets/js/lite-youtube.js?v=241"></script>
<script src="/chat.js?v=3023"></script>
<script src="/chat.js?v=3024"></script>
</body>