mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
Fix switchClick not always being fired.
Run detectFileType on switched output
This commit is contained in:
parent
05d81eb734
commit
c529a406cd
2 changed files with 21 additions and 14 deletions
|
@ -1229,18 +1229,15 @@ class OutputWaiter {
|
|||
* Handler for switch click events.
|
||||
* Moves the current output into the input textarea.
|
||||
*/
|
||||
switchClick() {
|
||||
const active = this.getActive(true);
|
||||
const transferable = (typeof active === "string" ? undefined : [active]);
|
||||
if (typeof active === "string") {
|
||||
this.manager.input.inputWorker.postMessage({
|
||||
action: "inputSwitch",
|
||||
data: {
|
||||
inputNum: this.manager.tabs.getActiveInputTab(),
|
||||
outputData: active
|
||||
}
|
||||
}, transferable);
|
||||
}
|
||||
async switchClick() {
|
||||
const active = await this.getDishBuffer(this.getOutputDish(this.manager.tabs.getActiveOutputTab()));
|
||||
this.manager.input.inputWorker.postMessage({
|
||||
action: "inputSwitch",
|
||||
data: {
|
||||
inputNum: this.manager.tabs.getActiveInputTab(),
|
||||
outputData: active
|
||||
}
|
||||
}, [active]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue