mirror of
https://github.com/gchq/CyberChef.git
synced 2025-07-04 20:02:29 -04:00
fixed linting errors
This commit is contained in:
parent
6b1086ddb9
commit
959aa709c3
2 changed files with 33 additions and 33 deletions
|
@ -291,7 +291,7 @@ class OperationsWaiter {
|
||||||
const cat = document.getElementById("categories");
|
const cat = document.getElementById("categories");
|
||||||
for (let i = 0; i < cat.children.length; i++) {
|
for (let i = 0; i < cat.children.length; i++) {
|
||||||
cat.children[i].addEventListener("keydown", this.keyboardEventHandler, false);
|
cat.children[i].addEventListener("keydown", this.keyboardEventHandler, false);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -303,7 +303,7 @@ class OperationsWaiter {
|
||||||
if (ev.key === "Enter" || ev.key === "Space" || ev.key === " ") {
|
if (ev.key === "Enter" || ev.key === "Space" || ev.key === " ") {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
for (let i = 0; i < ev.target.childNodes.length; i++) {
|
for (let i = 0; i < ev.target.childNodes.length; i++) {
|
||||||
let targetChild = ev.target.childNodes[i].classList;
|
const targetChild = ev.target.childNodes[i].classList;
|
||||||
if (targetChild !== undefined && targetChild.value.includes("panel-collapse collapse")) {
|
if (targetChild !== undefined && targetChild.value.includes("panel-collapse collapse")) {
|
||||||
if (!targetChild.contains("show")) {
|
if (!targetChild.contains("show")) {
|
||||||
targetChild.add("show");
|
targetChild.add("show");
|
||||||
|
@ -311,22 +311,22 @@ class OperationsWaiter {
|
||||||
targetChild.remove("show");
|
targetChild.remove("show");
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to populate recipe.
|
* Handler to populate recipe.
|
||||||
* Get the children of op-list and add event listener to them.
|
* Get the children of op-list and add event listener to them.
|
||||||
*/
|
*/
|
||||||
operationPopulateRecipe() {
|
operationPopulateRecipe() {
|
||||||
let cat = document.querySelectorAll(".op-list li.operation");
|
const cat = document.querySelectorAll(".op-list li.operation");
|
||||||
for (let i = 0; i < cat.children.length; i++) {
|
for (let i = 0; i < cat.children.length; i++) {
|
||||||
cat.children[i].addEventListener("keydown", this.keyboardPopulateRecipe, false);
|
cat.children[i].addEventListener("keydown", this.keyboardPopulateRecipe, false);
|
||||||
};
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ class OperationsWaiter {
|
||||||
*/
|
*/
|
||||||
keyboardPopulateRecipe(ev) {
|
keyboardPopulateRecipe(ev) {
|
||||||
if (ev.ctrlKey && ev.key === "Enter") {
|
if (ev.ctrlKey && ev.key === "Enter") {
|
||||||
const li = ev.target
|
const li = ev.target;
|
||||||
this.manager.recipe.addOperation(li.textContent);
|
this.manager.recipe.addOperation(li.textContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue