mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Increased file overlay slice to 4096 for larger screen support
This commit is contained in:
parent
f6b2783f8b
commit
f6b68f9880
2 changed files with 4 additions and 4 deletions
|
@ -275,13 +275,13 @@ InputWaiter.prototype.handleLoaderMessage = function(e) {
|
||||||
*/
|
*/
|
||||||
InputWaiter.prototype.displayFilePreview = function() {
|
InputWaiter.prototype.displayFilePreview = function() {
|
||||||
const inputText = document.getElementById("input-text"),
|
const inputText = document.getElementById("input-text"),
|
||||||
fileSlice = this.fileBuffer.slice(0, 2048);
|
fileSlice = this.fileBuffer.slice(0, 4096);
|
||||||
|
|
||||||
inputText.style.overflow = "hidden";
|
inputText.style.overflow = "hidden";
|
||||||
inputText.classList.add("blur");
|
inputText.classList.add("blur");
|
||||||
inputText.value = Utils.printable(Utils.arrayBufferToStr(fileSlice));
|
inputText.value = Utils.printable(Utils.arrayBufferToStr(fileSlice));
|
||||||
if (this.fileBuffer.byteLength > 2048) {
|
if (this.fileBuffer.byteLength > 4096) {
|
||||||
inputText.value += "[truncated]";
|
inputText.value += "[truncated]...";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ OutputWaiter.prototype.setFile = function(buf) {
|
||||||
|
|
||||||
// Display preview slice in the background
|
// Display preview slice in the background
|
||||||
const outputText = document.getElementById("output-text"),
|
const outputText = document.getElementById("output-text"),
|
||||||
fileSlice = this.dishBuffer.slice(0, 2048);
|
fileSlice = this.dishBuffer.slice(0, 4096);
|
||||||
|
|
||||||
outputText.classList.add("blur");
|
outputText.classList.add("blur");
|
||||||
outputText.value = Utils.printable(Utils.arrayBufferToStr(fileSlice));
|
outputText.value = Utils.printable(Utils.arrayBufferToStr(fileSlice));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue