From fbf129b303a447fb612cda634fe065be90b50329 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Sat, 13 Jul 2024 22:49:14 -0700 Subject: [PATCH] fix folders --- src/listing.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/listing.html b/src/listing.html index e91cf9e..525cf82 100644 --- a/src/listing.html +++ b/src/listing.html @@ -39,7 +39,7 @@ box-sizing: inherit; } .icon-folder { - background-image: url('data:image/svg+xml,'); + background-image: url('data:image/svg+xml,'); } .icon-video { background-image: url('data:image/svg+xml, '); @@ -502,11 +502,10 @@

~{linked-path}

}; entries.forEach(e => { - if (e.name.endsWith('/')) { - return makeFolderLink(e); - } const ext = e.name.substring(e.name.lastIndexOf('.') + 1); - const fn = extFNs[ext.toLowerCase()] || makeLink; + const fn = e.name.endsWith('/') + ? makeFolderLink + : extFNs[ext.toLowerCase()] || makeLink; imageGrid.appendChild(fn(e)); });