mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Operations can now set options from within the worker
This commit is contained in:
parent
13f07abb8a
commit
f6b52b7c82
10 changed files with 81 additions and 38 deletions
|
@ -119,11 +119,11 @@ const ByteRepr = {
|
|||
else if (ordinal < 4294967296) padding = 8;
|
||||
else padding = 2;
|
||||
|
||||
if (padding > 2 && app) app.options.attemptHighlight = false;
|
||||
if (padding > 2 && ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false);
|
||||
|
||||
output += Utils.hex(ordinal, padding) + delim;
|
||||
} else {
|
||||
if (app) app.options.attemptHighlight = false;
|
||||
if (ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false);
|
||||
output += ordinal.toString(base) + delim;
|
||||
}
|
||||
}
|
||||
|
@ -149,9 +149,7 @@ const ByteRepr = {
|
|||
throw "Error: Base argument must be between 2 and 36";
|
||||
}
|
||||
|
||||
if (base !== 16 && app) {
|
||||
app.options.attemptHighlight = false;
|
||||
}
|
||||
if (base !== 16 && ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false);
|
||||
|
||||
// Split into groups of 2 if the whole string is concatenated and
|
||||
// too long to be a single character
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue