From fec952c9eeed16dcfc60620c0ae30e57b354ebce Mon Sep 17 00:00:00 2001 From: dsyoon Date: Sat, 7 Feb 2026 20:40:00 +0900 Subject: [PATCH] Restore favicons using site /favicon.ico Show each link's favicon from its origin instead of letter-only badges. Co-authored-by: Cursor --- script.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index ca9df47..b8f6a6f 100644 --- a/script.js +++ b/script.js @@ -131,6 +131,15 @@ } } + function faviconUrl(url) { + try { + const u = new URL(url); + return `${u.origin}/favicon.ico`; + } catch { + return ""; + } + } + function escapeHtml(s) { return String(s) .replaceAll("&", "&") @@ -261,13 +270,18 @@ const letter = escapeHtml((link.title || domain || "L").trim().slice(0, 1).toUpperCase()); const lockAttr = state.canManage ? "" : ' disabled aria-disabled="true"'; const lockTitle = state.canManage ? "" : ' title="관리 기능은 로그인 후 사용 가능합니다."'; + const fav = faviconUrl(link.url); return `
${title}