Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit 7bfd851

Browse files
authored
Update index.html
Signed-off-by: Blake Arnold <[email protected]>
1 parent 82f1604 commit 7bfd851

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

index.html

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@
271271
}
272272
}
273273
</style>
274+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
274275
</head>
275276
<body>
276277
<div class="above-tabs">
@@ -331,16 +332,16 @@
331332
}
332333
function getFileTypeIcon(fileName) {
333334
const ext = fileName.split('.').pop().toLowerCase();
334-
if (['jpg','jpeg','png','gif','bmp','svg','webp'].includes(ext)) return '🖼️';
335-
if (['pdf'].includes(ext)) return '📄';
336-
if (['doc','docx'].includes(ext)) return '📝';
337-
if (['xls','xlsx','csv'].includes(ext)) return '📊';
338-
if (['ppt','pptx'].includes(ext)) return '📊';
339-
if (['zip','rar','7z','tar','gz'].includes(ext)) return '🗜️';
340-
if (['mp3','wav','ogg','m4a'].includes(ext)) return '🎵';
341-
if (['mp4','avi','mov','mkv'].includes(ext)) return '🎬';
342-
if (['txt','md','rtf','json','log'].includes(ext)) return '📃';
343-
return '📁';
335+
if (['jpg','jpeg','png','gif','bmp','svg','webp'].includes(ext)) return '<i class="fa-regular fa-image"></i>';
336+
if (['pdf'].includes(ext)) return '<i class="fa-regular fa-file-pdf"></i>';
337+
if (['doc','docx'].includes(ext)) return '<i class="fa-regular fa-file-word"></i>';
338+
if (['xls','xlsx','csv'].includes(ext)) return '<i class="fa-regular fa-file-excel"></i>';
339+
if (['ppt','pptx'].includes(ext)) return '<i class="fa-regular fa-file-powerpoint"></i>';
340+
if (['zip','rar','7z','tar','gz'].includes(ext)) return '<i class="fa-regular fa-file-zipper"></i>';
341+
if (['mp3','wav','ogg','m4a'].includes(ext)) return '<i class="fa-regular fa-file-audio"></i>';
342+
if (['mp4','avi','mov','mkv'].includes(ext)) return '<i class="fa-regular fa-file-video"></i>';
343+
if (['txt','md','rtf','json','log'].includes(ext)) return '<i class="fa-regular fa-file-lines"></i>';
344+
return '<i class="fa-regular fa-file"></i>';
344345
}
345346
function fileToBase64(file) {
346347
return new Promise((resolve, reject) => {
@@ -403,7 +404,7 @@
403404
li.className = "file-pill";
404405
const icon = document.createElement('span');
405406
icon.className = "file-icon";
406-
icon.textContent = getFileTypeIcon(f.name);
407+
icon.innerHTML = getFileTypeIcon(f.name);
407408
const title = document.createElement('span');
408409
title.className = "file-title";
409410
title.textContent = f.name;
@@ -412,7 +413,7 @@
412413
const downloadBtn = document.createElement('button');
413414
downloadBtn.type = "button";
414415
downloadBtn.title = "Download";
415-
downloadBtn.innerHTML = "⬇️";
416+
downloadBtn.innerHTML = '<i class="fa-solid fa-download"></i>';
416417
downloadBtn.onclick = function() {
417418
const blob = new Blob([f.file], {type: f.file.type});
418419
const url = URL.createObjectURL(blob);
@@ -430,7 +431,7 @@
430431
removeBtn.type = "button";
431432
removeBtn.title = "Remove";
432433
removeBtn.className = "remove-btn";
433-
removeBtn.innerHTML = "🗑️";
434+
removeBtn.innerHTML = '<i class="fa-solid fa-xmark"></i>';
434435
removeBtn.onclick = function() {
435436
attachedFiles.splice(i, 1);
436437
attachedFileObjs.splice(i, 1);

0 commit comments

Comments
 (0)