mirror of
https://github.com/gchq/CyberChef
synced 2025-01-09 19:18:47 +00:00
Remove new lines from input tab header
This commit is contained in:
parent
d99cf9d499
commit
5a52e5e9b3
2 changed files with 3 additions and 1 deletions
|
@ -674,7 +674,7 @@ class InputWaiter {
|
||||||
(value.count("\n") + 1) : null;
|
(value.count("\n") + 1) : null;
|
||||||
this.setInputInfo(value.length, lines);
|
this.setInputInfo(value.length, lines);
|
||||||
this.updateInputValue(activeTab, value);
|
this.updateInputValue(activeTab, value);
|
||||||
this.manager.tabs.updateInputTabHeader(activeTab, value);
|
this.manager.tabs.updateInputTabHeader(activeTab, value.replace(/[\n\r]/g, "").slice(0, 100));
|
||||||
|
|
||||||
if (e && this.badKeys.indexOf(e.keyCode) < 0) {
|
if (e && this.badKeys.indexOf(e.keyCode) < 0) {
|
||||||
// Fire the statechange event as the input has been modified
|
// Fire the statechange event as the input has been modified
|
||||||
|
|
|
@ -433,6 +433,8 @@ self.updateTabHeader = function(inputNum) {
|
||||||
if (typeof inputData !== "string") {
|
if (typeof inputData !== "string") {
|
||||||
inputData = input.data.name;
|
inputData = input.data.name;
|
||||||
}
|
}
|
||||||
|
inputData = inputData.replace(/[\n\r]/g, "");
|
||||||
|
|
||||||
self.postMessage({
|
self.postMessage({
|
||||||
action: "updateTabHeader",
|
action: "updateTabHeader",
|
||||||
data: {
|
data: {
|
||||||
|
|
Loading…
Reference in a new issue