mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04:00
Change baking to send all inputs individually.
Re-enable go to tab button. Active tab is now autobaked on load completion. Handle (ish) loaderWorker errors. Improve load performance.
This commit is contained in:
parent
f638bd4ded
commit
1cf83c2485
6 changed files with 206 additions and 154 deletions
|
@ -27,6 +27,7 @@ class OutputWaiter {
|
|||
this.manager = manager;
|
||||
|
||||
this.outputs = {};
|
||||
this.activeTab = -1;
|
||||
|
||||
this.maxTabs = 4; // Calculate this
|
||||
}
|
||||
|
@ -466,6 +467,7 @@ class OutputWaiter {
|
|||
for (let i = 0; i < tabs.length; i++) {
|
||||
if (tabs.item(i).getAttribute("inputNum") === inputNum.toString()) {
|
||||
tabs.item(i).classList.add("active-output-tab");
|
||||
this.activeTab = inputNum;
|
||||
found = true;
|
||||
} else {
|
||||
tabs.item(i).classList.remove("active-output-tab");
|
||||
|
@ -482,6 +484,7 @@ class OutputWaiter {
|
|||
tabs.item(i).setAttribute("inputNum", newOutputs[i].toString());
|
||||
this.displayTabInfo(newOutputs[i]);
|
||||
if (newOutputs[i] === inputNum) {
|
||||
this.activeTab = inputNum;
|
||||
tabs.item(i).classList.add("active-output-tab");
|
||||
}
|
||||
}
|
||||
|
@ -740,13 +743,7 @@ class OutputWaiter {
|
|||
* @returns {number}
|
||||
*/
|
||||
getActiveTab() {
|
||||
const activeTabs = document.getElementsByClassName("active-output-tab");
|
||||
if (activeTabs.length > 0) {
|
||||
const activeTab = activeTabs.item(0);
|
||||
const tabNum = activeTab.getAttribute("inputNum");
|
||||
return parseInt(tabNum, 10);
|
||||
}
|
||||
return -1;
|
||||
return this.activeTab;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue