mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 16:56:15 -04:00
Improved file type detection and timing output
This commit is contained in:
parent
659325c85a
commit
533047a3a2
3 changed files with 43 additions and 6 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
import {showSidePanel} from "./sidePanel.mjs";
|
||||
import Utils from "../../core/Utils.mjs";
|
||||
import {isImage} from "../../core/lib/FileType.mjs";
|
||||
import {isImage, detectFileType} from "../../core/lib/FileType.mjs";
|
||||
|
||||
/**
|
||||
* A File Details extension for CodeMirror
|
||||
|
@ -102,7 +102,7 @@ class FileDetailsPanel {
|
|||
} else {
|
||||
this.resetFileThumb();
|
||||
}
|
||||
fileType.textContent = type;
|
||||
fileType.textContent = type ? type : detectFileType(fileBuffer)[0]?.mime ?? "unknown";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -254,7 +254,7 @@ class StatusBarPanel {
|
|||
|
||||
if (this.label === "Output" && this.timing) {
|
||||
bakingTimeInfo.style.display = "inline-block";
|
||||
bakingTime.textContent = this.timing.overallDuration(this.tabNumGetter());
|
||||
bakingTime.textContent = this.timing.duration(this.tabNumGetter());
|
||||
|
||||
const info = this.timing.printStages(this.tabNumGetter()).replace(/\n/g, "<br>");
|
||||
bakingTimeInfo.setAttribute("title", info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue