Add a "Show controls" button to chat UI (#3590)
This commit is contained in:
parent
32ff3da941
commit
2a29208224
5 changed files with 66 additions and 16 deletions
18
js/show_controls.js
Normal file
18
js/show_controls.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
const belowChatInput = document.querySelectorAll("#chat-tab > div > :nth-child(n+3), #extensions");
|
||||
const chatParent = document.getElementById("chat").parentNode;
|
||||
|
||||
function toggle_controls(value) {
|
||||
if (value) {
|
||||
belowChatInput.forEach(element => {
|
||||
element.style.display = "inherit";
|
||||
});
|
||||
|
||||
chatParent.classList.remove("bigchat");
|
||||
} else {
|
||||
belowChatInput.forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
|
||||
chatParent.classList.add("bigchat");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue