Skip to content

Commit 2fc6970

Browse files
committed
display format abbreviation in handler list
1 parent 5166975 commit 2fc6970

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,17 @@ async function buildOptionList () {
204204
newOption.setAttribute("format-index", (allOptions.length - 1).toString());
205205
newOption.setAttribute("mime-type", format.mime);
206206

207+
const formatDescriptor = format.format.toUpperCase();
207208
if (simpleMode) {
208209
// Hide any handler-specific information in simple mode
209210
const cleanName = format.name
210211
.split("(").join(")").split(")")
211212
.filter((_, i) => i % 2 === 0)
212213
.filter(c => c != "")
213214
.join(" ");
214-
newOption.appendChild(document.createTextNode(cleanName + ` (${format.mime})`));
215+
newOption.appendChild(document.createTextNode(`${formatDescriptor} - ${cleanName} (${format.mime})`));
215216
} else {
216-
newOption.appendChild(document.createTextNode(format.name + ` (${format.mime}) ${handler.name}`));
217+
newOption.appendChild(document.createTextNode(`${formatDescriptor} - ${format.name} (${format.mime}) ${handler.name}`));
217218
}
218219

219220
const clickHandler = (event: Event) => {

0 commit comments

Comments
 (0)