diff --git a/script.js b/script.js index 1381ce0..a85f3b6 100644 --- a/script.js +++ b/script.js @@ -309,6 +309,16 @@ function createResourceCard(resource) { card.setAttribute('itemscope', ''); card.setAttribute('itemtype', 'https://schema.org/SoftwareApplication'); + // Extract domain for favicon + let faviconUrl = ''; + try { + const url = new URL(resource.link); + // Using Google's favicon service as a fallback if the direct favicon isn't available + faviconUrl = `https://www.google.com/s2/favicons?domain=${url.hostname}&sz=32`; + } catch (e) { + console.warn('Invalid URL:', resource.link); + } + card.innerHTML = `