mirror of
https://github.com/gchq/CyberChef
synced 2025-12-30 15:13:36 +00:00
Turn output tabs into progress bars!
This commit is contained in:
@@ -212,6 +212,24 @@ self.sendStatusMessage = function(msg) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Send progress update to the app.
|
||||
*
|
||||
* @param {number} progress
|
||||
* @param {number} total
|
||||
*/
|
||||
self.sendProgressMessage = function(progress, total) {
|
||||
self.postMessage({
|
||||
action: "progressMessage",
|
||||
data: {
|
||||
progress: progress,
|
||||
total: total,
|
||||
inputNum: self.inputNum
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Send an option value update to the app.
|
||||
*
|
||||
|
||||
@@ -204,6 +204,7 @@ class Recipe {
|
||||
|
||||
if (ENVIRONMENT_IS_WORKER()) {
|
||||
self.sendStatusMessage(`Baking... (${i+1}/${this.opList.length})`);
|
||||
self.sendProgressMessage(i + 1, this.opList.length);
|
||||
}
|
||||
|
||||
if (op.flowControl) {
|
||||
|
||||
Reference in New Issue
Block a user