mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Removed auto-bake threshold as long bakes can now be cancelled manually
This commit is contained in:
parent
6742bef289
commit
9f19afc943
5 changed files with 1 additions and 17 deletions
|
@ -213,13 +213,6 @@ App.prototype.bakingComplete = function(response) {
|
||||||
this.progress = response.progress;
|
this.progress = response.progress;
|
||||||
this.manager.recipe.updateBreakpointIndicator(response.progress);
|
this.manager.recipe.updateBreakpointIndicator(response.progress);
|
||||||
this.manager.output.set(response.result, response.type, response.duration);
|
this.manager.output.set(response.result, response.type, response.duration);
|
||||||
|
|
||||||
// If baking took too long, disable auto-bake
|
|
||||||
if (response.duration > this.options.autoBakeThreshold && this.autoBake_) {
|
|
||||||
this.manager.controls.setAutoBake(false);
|
|
||||||
this.alert("Baking took longer than " + this.options.autoBakeThreshold +
|
|
||||||
"ms, Auto Bake has been disabled.", "warning", 5000);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -158,11 +158,6 @@ InputWaiter.prototype.inputDrop = function(e) {
|
||||||
const CHUNK_SIZE = 20480; // 20KB
|
const CHUNK_SIZE = 20480; // 20KB
|
||||||
|
|
||||||
const setInput = function() {
|
const setInput = function() {
|
||||||
if (inputCharcode.length > 100000 && this.app.autoBake_) {
|
|
||||||
this.manager.controls.setAutoBake(false);
|
|
||||||
this.app.alert("Turned off Auto Bake as the input is large", "warning", 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.set(inputCharcode);
|
this.set(inputCharcode);
|
||||||
const recipeConfig = this.app.getRecipeConfig();
|
const recipeConfig = this.app.getRecipeConfig();
|
||||||
if (!recipeConfig[0] || recipeConfig[0].op !== "From Hex") {
|
if (!recipeConfig[0] || recipeConfig[0].op !== "From Hex") {
|
||||||
|
|
|
@ -302,10 +302,6 @@
|
||||||
<input type="number" option="errorTimeout" id="errorTimeout" />
|
<input type="number" option="errorTimeout" id="errorTimeout" />
|
||||||
<label for="errorTimeout"> Operation error timeout in ms (0 for never) </label>
|
<label for="errorTimeout"> Operation error timeout in ms (0 for never) </label>
|
||||||
</div>
|
</div>
|
||||||
<div class="option-item">
|
|
||||||
<input type="number" option="autoBakeThreshold" id="autoBakeThreshold"/>
|
|
||||||
<label for="autoBakeThreshold"> Auto Bake threshold in ms </label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" id="reset-options">Reset options to default</button>
|
<button type="button" class="btn btn-default" id="reset-options">Reset options to default</button>
|
||||||
|
|
|
@ -44,7 +44,6 @@ function main() {
|
||||||
wordWrap: true,
|
wordWrap: true,
|
||||||
showErrors: true,
|
showErrors: true,
|
||||||
errorTimeout: 4000,
|
errorTimeout: 4000,
|
||||||
autoBakeThreshold: 200,
|
|
||||||
attemptHighlight: true,
|
attemptHighlight: true,
|
||||||
theme: "classic",
|
theme: "classic",
|
||||||
};
|
};
|
||||||
|
|
|
@ -108,4 +108,5 @@
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
font-size: larger;
|
font-size: larger;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
cursor: help;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue