Move hover menu shortcuts to right side (#3951)

This commit is contained in:
missionfloyd 2023-09-17 19:33:00 -06:00 committed by GitHub
parent 280cca9f66
commit cc8eda298a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 71 additions and 47 deletions

View file

@ -1,6 +1,5 @@
const belowChatInput = document.querySelectorAll("#chat-tab > div > :nth-child(n+2), #extensions");
const chatParent = document.querySelector(".chat-parent");
let isOld = document.querySelectorAll('.old-ui').length > 0;
function toggle_controls(value) {
if (value) {
@ -9,15 +8,15 @@ function toggle_controls(value) {
});
chatParent.classList.remove("bigchat");
document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = isOld ? '0px' : '20px';
document.getElementById('show-controls').parentNode.parentNode.style.paddingBottom = isOld ? '95px' : '115px';
document.getElementById('chat-input-row').classList.remove("bigchat");
document.getElementById('chat-col').classList.remove("bigchat");
} else {
belowChatInput.forEach(element => {
element.style.display = "none";
});
chatParent.classList.add("bigchat");
document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = '0px';
document.getElementById('show-controls').parentNode.parentNode.style.paddingBottom = '95px';
document.getElementById('chat-input-row').classList.add("bigchat")
document.getElementById('chat-col').classList.add("bigchat");
}
}