text-generation-webui/js/show_controls.js

21 lines
775 B
JavaScript
Raw Normal View History

const belowChatInput = document.querySelectorAll("#chat-tab > div > :nth-child(n+3), #extensions");
const chatParent = document.getElementById("chat").parentNode.parentNode.parentNode;
function toggle_controls(value) {
if (value) {
belowChatInput.forEach(element => {
element.style.display = "inherit";
});
chatParent.classList.remove("bigchat");
2023-09-13 07:36:12 +02:00
document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = '20px';
} else {
belowChatInput.forEach(element => {
element.style.display = "none";
});
chatParent.classList.add("bigchat");
2023-09-13 07:36:12 +02:00
document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = '0px';
}
}