mirror of
https://github.com/gchq/CyberChef
synced 2025-01-08 10:38:46 +00:00
Add clicking on output search result
This commit is contained in:
parent
5d52f4a760
commit
413e80ed3e
2 changed files with 16 additions and 1 deletions
|
@ -210,7 +210,7 @@ class Manager {
|
||||||
document.getElementById("output-num-results").addEventListener("change", this.output.filterTabSearch.bind(this.output));
|
document.getElementById("output-num-results").addEventListener("change", this.output.filterTabSearch.bind(this.output));
|
||||||
document.getElementById("output-num-results").addEventListener("keyup", this.output.filterTabSearch.bind(this.output));
|
document.getElementById("output-num-results").addEventListener("keyup", this.output.filterTabSearch.bind(this.output));
|
||||||
document.getElementById("output-filter-refresh").addEventListener("click", this.output.filterTabSearch.bind(this.output));
|
document.getElementById("output-filter-refresh").addEventListener("click", this.output.filterTabSearch.bind(this.output));
|
||||||
// this.addDynamicListener(".output-filter-result", "click", this.output.filterItemClick, this.output);
|
this.addDynamicListener(".output-filter-result", "click", this.output.filterItemClick, this.output);
|
||||||
|
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
|
|
|
@ -1333,6 +1333,21 @@ class OutputWaiter {
|
||||||
resultsList.appendChild(newListItem);
|
resultsList.appendChild(newListItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for clicking on a filter result.
|
||||||
|
* Changes to the clicked output
|
||||||
|
*
|
||||||
|
* @param {event} e
|
||||||
|
*/
|
||||||
|
filterItemClick(e) {
|
||||||
|
if (!e.target) return;
|
||||||
|
const inputNum = parseInt(e.target.getAttribute("inputNum"), 10);
|
||||||
|
if (inputNum <= 0) return;
|
||||||
|
|
||||||
|
$("#output-tab-modal").modal("hide");
|
||||||
|
this.changeTab(inputNum, this.app.options.syncTabs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default OutputWaiter;
|
export default OutputWaiter;
|
||||||
|
|
Loading…
Reference in a new issue