File size: 1,059 Bytes
cfbfaf1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const belowChatInput = document.querySelectorAll("#chat-tab > div > :nth-child(n+2), #extensions");
const chatParent = document.querySelector(".chat-parent");

function toggle_controls(value) {
  if (value) {
    belowChatInput.forEach(element => {
      element.style.display = "inherit";
    });

    chatParent.classList.remove("bigchat");
    document.getElementById("chat-input-row").classList.remove("bigchat");
    document.getElementById("chat-col").classList.remove("bigchat");
    document.getElementById("chat-tab").style.paddingBottom = "";

    let gallery_element = document.getElementById("gallery-extension");
    if (gallery_element) {
      gallery_element.style.display = "block";
    }

  } else {
    belowChatInput.forEach(element => {
      element.style.display = "none";
    });

    chatParent.classList.add("bigchat");
    document.getElementById("chat-input-row").classList.add("bigchat");
    document.getElementById("chat-col").classList.add("bigchat");
    document.getElementById("chat-tab").style.paddingBottom = "0px";
  }
}