text-generation-webui/css/main.js

19 lines
727 B
JavaScript
Raw Normal View History

2023-04-10 21:15:16 +02:00
document.getElementById("main").parentNode.childNodes[0].classList.add("header_bar");
2023-03-15 17:24:54 +01:00
document.getElementById("main").parentNode.style = "padding: 0; margin: 0";
document.getElementById("main").parentNode.parentNode.parentNode.style = "padding: 0";
// Get references to the elements
let main = document.getElementById('main');
let main_parent = main.parentNode;
let extensions = document.getElementById('extensions');
// Add an event listener to the main element
main_parent.addEventListener('click', function(e) {
// Check if the main element is visible
if (main.offsetHeight > 0 && main.offsetWidth > 0) {
2023-03-27 03:20:30 +02:00
extensions.style.display = 'flex';
} else {
2023-03-15 20:41:38 +01:00
extensions.style.display = 'none';
}
});