mirror of
https://github.com/gchq/CyberChef
synced 2025-01-09 11:08:47 +00:00
Set URL input parameter when setting input.
(e.g. when tab changed or removed)
This commit is contained in:
parent
99e9df0211
commit
0e5944e9c6
1 changed files with 10 additions and 0 deletions
|
@ -352,6 +352,16 @@ class InputWaiter {
|
||||||
const lines = inputData.input.length < (this.app.options.ioDisplayThreshold * 1024) ?
|
const lines = inputData.input.length < (this.app.options.ioDisplayThreshold * 1024) ?
|
||||||
inputData.input.count("\n") + 1 : null;
|
inputData.input.count("\n") + 1 : null;
|
||||||
this.setInputInfo(inputData.input.length, lines);
|
this.setInputInfo(inputData.input.length, lines);
|
||||||
|
|
||||||
|
// Set URL to current input
|
||||||
|
const inputStr = toBase64(inputData.input, "A-Za-z0-9+/");
|
||||||
|
if (inputStr.length > 0 && inputStr.length <= 68267) {
|
||||||
|
this.setUrl({
|
||||||
|
includeInput: true,
|
||||||
|
input: inputStr
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!silent) window.dispatchEvent(this.manager.statechange);
|
if (!silent) window.dispatchEvent(this.manager.statechange);
|
||||||
} else {
|
} else {
|
||||||
this.setFile(inputData);
|
this.setFile(inputData);
|
||||||
|
|
Loading…
Reference in a new issue