From 27a4e0c72f50143514fd1f620a19537e71c3ebd9 Mon Sep 17 00:00:00 2001 From: GCHQDeveloper581 <63102987+GCHQDeveloper581@users.noreply.github.com> Date: Sat, 4 Jul 2026 17:03:27 +0100 Subject: [PATCH] Updated Adding a new operation (markdown) --- Adding-a-new-operation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Adding-a-new-operation.md b/Adding-a-new-operation.md index 83c58e6..dd0bd32 100644 --- a/Adding-a-new-operation.md +++ b/Adding-a-new-operation.md @@ -64,6 +64,8 @@ Operation arguments (ingredients) can be set to any of the following types: - Operation receives an object with two properties: `option` containing the user's dropdown selection, and `string` containing the input box contents. - Particularly useful for arguments that can be specified in various different formats. - See the [XOR](https://github.com/gchq/CyberChef/blob/master/src/core/operations/XOR.mjs) operation for an example of how this works. + 10. `argSelector` + - `value` is an array of `name`, `on`, `off` triples. The user is presented with a dropdown selection box with each of the names as an option. `on` and `off` are arrays of argument numbers which are enabled/disabled when the corresponding option is selected. The ingredients are numbered according to their position in the `this.args[]` array. The name of the selected option is sent to the operation. **Ingredient Validation**