mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-07 06:57:12 -04:00
fix selected class bug messed up after refactoring
This commit is contained in:
parent
9a7ec25493
commit
82837254ea
1 changed files with 6 additions and 1 deletions
|
@ -611,7 +611,12 @@ class RecipeWaiter {
|
|||
* @param {string} opDataName the data-name of the target operation
|
||||
*/
|
||||
addSelectedClass(opDataName) {
|
||||
document.querySelector(`.operation[data-name="${opDataName}"]`).classList.add("selected");
|
||||
const ops = document.querySelectorAll(`.operation[data-name="${opDataName}"]`);
|
||||
|
||||
// A selected operation can occur twice if it's in favourites and the original category op-list
|
||||
ops.forEach((op => {
|
||||
op.classList.add("selected");
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue