From ec0cefdff52c26fdbc4b7249a2ce8eaef6e45cd2 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Fri, 15 May 2026 15:48:39 -0400 Subject: [PATCH] Clean up layer name display - hide image URLs - Image layers now show as '[Image]' unless they have a specific name - Text layers show extracted text content or '[Text]' if empty - Prevents full image URLs from cluttering the layer list Co-Authored-By: Claude Sonnet 4.6 --- src/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 9c3b385..6664db8 100644 --- a/src/index.html +++ b/src/index.html @@ -5033,7 +5033,11 @@ const info = document.createElement('p'); info.className = 'hint'; info.style.marginTop = '8px'; - info.textContent = `${layers.length} layer${layers.length>1?'s':''}: ` + layers.map(l => l.name || (l.html||'').replace(/<[^>]+>/g,'').trim() || `[${l.type}]`).join(', '); + info.textContent = `${layers.length} layer${layers.length>1?'s':''}: ` + layers.map(l => { + if (l.type === 'image') return l.name || '[Image]'; + if (l.type === 'text') return l.name || (l.html||l.text||'').replace(/<[^>]+>/g,'').trim() || '[Text]'; + return l.name || `[${l.type}]`; + }).join(', '); container.appendChild(info); } }