chat shit

master
Aevann1 2022-08-26 21:31:46 +02:00
parent d2c6cf362e
commit 7e491208a3
2 changed files with 7 additions and 7 deletions

View File

@ -96,6 +96,11 @@ socket.on('speak', function(json) {
if (scrolled_down) box.scrollTo(0, box.scrollHeight)
})
function scroll_chat() {
setTimeout(function () {
box.scrollTo(0, box.scrollHeight)
}, 0200);
}
function send() {
text = textbox.value.trim()
@ -107,6 +112,7 @@ function send() {
socket.emit('typing', false);
}
autoExpand(textbox);
scroll_chat();
}
function quote(t) {
@ -180,12 +186,6 @@ socket.on('typing', function (users){
}
})
function scroll_chat() {
setTimeout(function () {
box.scrollTo(0, box.scrollHeight)
}, 0200);
}
scroll_chat()
box.scrollTo(0, box.scrollHeight)

View File

@ -191,7 +191,7 @@
</div>
<i class="btn btn-secondary mr-2 fas fa-smile-beam" style="padding-top:0.65rem" onclick="loadEmojis('input-text')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-placement="bottom" title="Add Emoji"></i>
<textarea onclick="scroll_chat()" id="input-text" minlength="1" maxlength="{% if SITE == 'rdrama.net' %}200{% else %}1000{% endif %}" style="font-size:16px!important" class="form-control" placeholder="Message" autocomplete="off" autofocus rows="1"></textarea>
<button id="chatsend" onclick="send();scroll_chat()" class="btn btn-primary ml-3" type="submit" onclick="disable(this)">Send</button>
<button id="chatsend" onclick="send()" class="btn btn-primary ml-3" type="submit" onclick="disable(this)">Send</button>
</div>
</div>
</div>