mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-03 13:09:15 -04:00
changed function names for easy readability
This commit is contained in:
parent
80c1c6d3ed
commit
3abd952f4f
2 changed files with 5 additions and 5 deletions
|
@ -148,7 +148,7 @@ class Manager {
|
|||
document.getElementById("edit-favourites").addEventListener("click", this.ops.editFavouritesClick.bind(this.ops));
|
||||
document.getElementById("save-favourites").addEventListener("click", this.ops.saveFavouritesClick.bind(this.ops));
|
||||
document.getElementById("categories").addEventListener("keydown", this.ops.onKeyPress.bind(this.ops));
|
||||
this.addDynamicListener(".op-list li.operation","keydown", this.ops.keysPopulateRecipe.bind(this.ops));
|
||||
this.addDynamicListener(".op-list li.operation","keydown", this.ops.keyboardPopulateRecipe.bind(this.ops));
|
||||
document.getElementById("reset-favourites").addEventListener("click", this.ops.resetFavouritesClick.bind(this.ops));
|
||||
this.addDynamicListener(".op-list", "oplistcreate", this.ops.opListCreate, this.ops);
|
||||
this.addDynamicListener("li.operation", "operationadd", this.recipe.opAdd, this.recipe);
|
||||
|
|
|
@ -291,7 +291,7 @@ class OperationsWaiter {
|
|||
let cat = document.getElementById("categories");
|
||||
console.log("cat=" , cat);
|
||||
for(let i = 0; i < cat.children.length; i++){
|
||||
cat.children[i].addEventListener("keydown", this.EventHandler, false);
|
||||
cat.children[i].addEventListener("keydown", this.keyboardEventHandler, false);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ class OperationsWaiter {
|
|||
* Uses "Enter" or "Space" to mimick the click function and open the operations panels .
|
||||
* @param {Event} ev
|
||||
*/
|
||||
EventHandler(ev){
|
||||
keyboardEventHandler(ev){
|
||||
if(ev.key === "Enter" || ev.key === "Space" || ev.key === " " ){
|
||||
ev.preventDefault();
|
||||
for(let i = 0; i < ev.target.childNodes.length; i++){
|
||||
|
@ -327,7 +327,7 @@ class OperationsWaiter {
|
|||
let cat = document.querySelectorAll(".op-list li.operation");
|
||||
console.log("cat=" , cat);
|
||||
for(let i = 0; i < cat.children.length; i++){
|
||||
cat.children[i].addEventListener("keydown", this.keysPopulateRecipe, false);
|
||||
cat.children[i].addEventListener("keydown", this.keyboardPopulateRecipe, false);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ class OperationsWaiter {
|
|||
* Uses keyboard shortcut "CTRl + Enter" to mimick operationDblClick handler function
|
||||
* @param {Event} ev
|
||||
*/
|
||||
keysPopulateRecipe(ev){
|
||||
keyboardPopulateRecipe(ev){
|
||||
if(ev.ctrlKey && ev.key === "Enter"){
|
||||
const li = ev.target
|
||||
this.manager.recipe.addOperation(li.textContent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue