From d3077c78b055892b90f6c5f75b179f096f854e2a Mon Sep 17 00:00:00 2001 From: Protocolbot Date: Mon, 6 Jul 2026 22:16:16 -0600 Subject: [PATCH] fix: suppress source field when it duplicates author, fix leading separator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - When source equals @username (same as the author), don't show SOURCE line - When source is empty, don't show a leading · separator before 'authored by' - Collections say 'curated by' instead of 'authored by' --- frontend/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 frontend/app.js diff --git a/frontend/app.js b/frontend/app.js old mode 100755 new mode 100644 index 490729e..70527aa --- a/frontend/app.js +++ b/frontend/app.js @@ -340,9 +340,9 @@ function renderDetail(p) { '

' + escapeHtml(s.headline) + '

' + escapeHtml(s.description || '') + '

'; }).join(''); const forkNotice = (p.forked_from && p.forked_from !== 'null') ? '
forked from: ' + p.forked_from + '
' : ''; - const sourceLine = p.source ? 'SOURCE: ' + escapeHtml(p.source) : ''; + const sourceLine = (p.source && p.source !== '@' + (p.author || '')) ? 'SOURCE: ' + escapeHtml(p.source) : ''; var sourceLink = p.source_url ? ' · view_original' : ''; - var authorLine = p.author ? ' · authored by @' + escapeHtml(p.author) + '' : ''; + var authorLine = p.author ? (sourceLine ? ' · ' : '') + 'authored by @' + escapeHtml(p.author) + '' : ''; var dateLine = p.created_at ? ' · added ' + formatDate(p.created_at) : ''; return '
' + tags + '
' + @@ -742,8 +742,8 @@ async function showCollectionDetail(slug) { } } } - var sourceLine = c.source ? 'SOURCE: ' + escapeHtml(c.source) : ''; - var authorLine = c.author ? ' · authored by @' + escapeHtml(c.author) + '' : ''; + var sourceLine = (c.source && c.source !== '@' + (c.author || '')) ? 'SOURCE: ' + escapeHtml(c.source) : ''; + var authorLine = c.author ? (sourceLine ? ' · ' : '') + 'curated by @' + escapeHtml(c.author) + '' : ''; var dateLine = c.created_at ? ' · added ' + formatDate(c.created_at) : ''; document.getElementById('collectionDetailContent').innerHTML =