Avoid external favicon fetches
Render letter badges instead of fetching favicons to prevent noisy 404 errors from Google favicon endpoints. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -131,11 +131,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function faviconUrl(url) {
|
||||
const domainUrl = encodeURIComponent(url);
|
||||
return `https://www.google.com/s2/favicons?domain_url=${domainUrl}&sz=64`;
|
||||
}
|
||||
|
||||
function escapeHtml(s) {
|
||||
return String(s)
|
||||
.replaceAll("&", "&")
|
||||
@@ -272,7 +267,7 @@
|
||||
<div class="card-head">
|
||||
<div class="card-title">
|
||||
<div class="favicon" aria-hidden="true">
|
||||
<img src="${faviconUrl(link.url)}" alt="" onerror="this.remove(); this.parentNode.insertAdjacentHTML('beforeend','<div class="letter">${letter}</div>');" />
|
||||
<div class="letter">${letter}</div>
|
||||
</div>
|
||||
<div class="title-wrap">
|
||||
<div class="title" title="${title}">${title}</div>
|
||||
|
||||
Reference in New Issue
Block a user