From 0a82d97f1c97439cdc778fe4daeec5bcef42bbda Mon Sep 17 00:00:00 2001 From: elioat <elioat@tilde.institute> Date: Sun, 16 Mar 2025 11:36:19 -0400 Subject: * --- html/immoral/app.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/html/immoral/app.js b/html/immoral/app.js index e1d1e65..3e6cfa7 100644 --- a/html/immoral/app.js +++ b/html/immoral/app.js @@ -528,11 +528,9 @@ document.addEventListener('DOMContentLoaded', () => { const resultsDiv = document.getElementById('results'); resultsDiv.innerHTML = ''; - // Convert urls to array if it's a Set, or use as is if already array let fontsArray = Array.isArray(urls) ? urls : Array.from(urls); - // Group fonts by family and collect their style variations - const fontFamilies = new Map(); // Map<familyName, Array<fontData>> + const fontFamilies = new Map(); fontsArray.forEach(fontData => { if (!fontFamilies.has(fontData.family)) { fontFamilies.set(fontData.family, { @@ -639,7 +637,7 @@ document.addEventListener('DOMContentLoaded', () => { variantPreview.id = `preview-${variant.filename}-${index}`; variantPreview.innerHTML = previewText; - // Extract style information from CSS rule if available + // Extract style information from CSS rule let styleInfo = 'Regular'; if (variant.cssRule) { const fontStyle = variant.cssRule.match(/font-style:\s*([^;]+)/); @@ -774,7 +772,6 @@ document.addEventListener('DOMContentLoaded', () => { await Promise.all(loadPromises); - // Apply font to size variants sizeVariations.querySelectorAll('div').forEach(div => { div.style.fontFamily = fontData.family; }); -- cgit 1.4.1-2-gfad0