mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-25 09:16:17 -04:00
add button to hide all recipe options
This commit is contained in:
parent
6b76b7004a
commit
3bb6a40f82
3 changed files with 34 additions and 0 deletions
|
@ -333,6 +333,36 @@ class ControlsWaiter {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Hides the options for all the operations in the current recipe.
|
||||
*/
|
||||
hideRecipeOptClick() {
|
||||
const icon = document.getElementById("hide-icon");
|
||||
|
||||
if (icon.getAttribute("hide-opt") === "false") {
|
||||
icon.setAttribute("hide-opt", "true");
|
||||
icon.setAttribute("data-original-title", "Show options");
|
||||
icon.children[0].innerText = "keyboard_arrow_down";
|
||||
Array.from(document.getElementsByClassName("hide-options")).forEach(function(item){
|
||||
item.setAttribute("hide-opt", "true");
|
||||
item.innerText = "keyboard_arrow_down";
|
||||
item.classList.add("hide-options-selected");
|
||||
item.parentNode.previousElementSibling.style.display = "none";
|
||||
});
|
||||
} else {
|
||||
icon.setAttribute("hide-opt", "false");
|
||||
icon.setAttribute("data-original-title", "Hide options");
|
||||
icon.children[0].innerText = "keyboard_arrow_up";
|
||||
Array.from(document.getElementsByClassName("hide-options")).forEach(function(item){
|
||||
item.setAttribute("hide-opt", "false");
|
||||
item.innerText = "keyboard_arrow_up";
|
||||
item.classList.remove("hide-options-selected");
|
||||
item.parentNode.previousElementSibling.style.display = "grid";
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Populates the bug report information box with useful technical info.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue