mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-25 09:16:17 -04:00
add button to hide recipe's options
This commit is contained in:
parent
c9d9730726
commit
6b76b7004a
3 changed files with 26 additions and 0 deletions
|
@ -214,6 +214,30 @@ class RecipeWaiter {
|
|||
window.dispatchEvent(this.manager.statechange);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for hide-opt click events.
|
||||
* Updates the icon status.
|
||||
*
|
||||
* @fires Manager#statechange
|
||||
* @param {event} e
|
||||
*/
|
||||
hideOptClick(e) {
|
||||
const icon = e.target;
|
||||
|
||||
if (icon.getAttribute("hide-opt") === "false") {
|
||||
icon.setAttribute("hide-opt", "true");
|
||||
icon.innerText = "keyboard_arrow_down";
|
||||
icon.classList.add("hide-options-selected");
|
||||
icon.parentNode.previousElementSibling.style.display = "none";
|
||||
} else {
|
||||
icon.setAttribute("hide-opt", "false");
|
||||
icon.innerText = "keyboard_arrow_up";
|
||||
icon.classList.remove("hide-options-selected");
|
||||
icon.parentNode.previousElementSibling.style.display = "grid";
|
||||
}
|
||||
|
||||
window.dispatchEvent(this.manager.statechange);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for disable click events.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue