diff options
Diffstat (limited to 'html')
-rw-r--r-- | html/immoral/app.js | 7 |
1 files 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; }); |