TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Favicons for HN

310 点作者 frabert大约 3 年前

30 条评论

ryeguy_24大约 3 年前
Cool idea but I generally like the text-based meritocracy that exists now. I mostly go by post title rather than source. I would bet that I’d be influenced by sources more if I saw the source’s favicon. Just a hypothesis.
评论 #31096902 未加载
评论 #31098738 未加载
dieulot大约 3 年前
Doesn’t work (at least for me in Chrome with Tampermonkey) due to Hacker News’s Content-Security-Policy header.<p>&gt; Refused to load the image &#x27;&lt;URL&gt;&#x27; because it violates the following Content Security Policy directive: &quot;img-src data: &#x27;self&#x27; &lt;URL&gt;&quot;.<p>Overriding this would probably require an extension with a Service Worker that edits the CSP header.
评论 #31096151 未加载
评论 #31095969 未加载
评论 #31095789 未加载
mkdirp大约 3 年前
As an aside, there&#x27;s Refined Hacker News[0] which seems like it would be a great option for this to be built into. It has lots of great features while keeping things minimal.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;plibither8&#x2F;refined-hacker-news" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;plibither8&#x2F;refined-hacker-news</a>
评论 #31096753 未加载
parhamn大约 3 年前
Tangent: try to make sure your websites serve the right favicon regardless of whether the user is logged in or not. Its honestly no big deal, but something I noticed writing the favicon service for synth.app (for tabs and such before we can calculate the favicon using the HTML).<p>For example, the google domains (gmail&#x2F;cal&#x2F;drive&#x2F;etc) all show the same google accounts favicon [1] and we had to special case a few more.<p>[1] <a href="https:&#x2F;&#x2F;icons.duckduckgo.com&#x2F;ip3&#x2F;mail.google.com.ico" rel="nofollow">https:&#x2F;&#x2F;icons.duckduckgo.com&#x2F;ip3&#x2F;mail.google.com.ico</a>
kappuchino大约 3 年前
I had to add &#x2F;&#x2F; @match <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;</a>* in the header to make it work in firefox.
评论 #31095958 未加载
评论 #31095691 未加载
JayGuerette大约 3 年前
My version, better alignment, grayscaled icons, eliminates duplicates on navigation:<p><pre><code> &#x2F;&#x2F; ==UserScript== &#x2F;&#x2F; @name hacker news favicons &#x2F;&#x2F; @match https:&#x2F;&#x2F;news.ycombinator.com&#x2F;* &#x2F;&#x2F; ==&#x2F;UserScript== for (let link of document.querySelectorAll(&#x27;.titlelink&#x27;)) { if (link.attributes[&quot;hasIcon&quot;] != &#x27;true&#x27;) { const domain = new URL(link.href).hostname const imageUrl = `https:&#x2F;&#x2F;icons.duckduckgo.com&#x2F;ip3&#x2F;${domain}.ico` const image = document.createElement(&#x27;img&#x27;) link.attributes[&quot;hasIcon&quot;] = &#x27;true&#x27; image.src = imageUrl image.width = 16 image.height = 16 image.style.paddingRight = &#x27;0.50em&#x27; image.style.paddingLeft = &#x27;0.50em&#x27; image.style.verticalAlign = &#x27;middle&#x27;; image.style.filter = &#x27;grayscale(1)&#x27;; link.prepend(image) } }</code></pre>
评论 #31098924 未加载
评论 #31097498 未加载
codesections大约 3 年前
For the curious, this is powered by DuckDuckGo&#x27;s favicon service, which takes significant steps to preserve request privacy. Details at <a href="https:&#x2F;&#x2F;help.duckduckgo.com&#x2F;duckduckgo-help-pages&#x2F;privacy&#x2F;favicons&#x2F;" rel="nofollow">https:&#x2F;&#x2F;help.duckduckgo.com&#x2F;duckduckgo-help-pages&#x2F;privacy&#x2F;fa...</a>
WithinReason大约 3 年前
Could be combined with HN avatars in a browser plugin:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30668137" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30668137</a>
alberth大约 3 年前
Oh please don&#x27;t.<p>I don&#x27;t want HN to turn into something like slack that is filled with emojis and animated gifs.<p>It&#x27;s just too much noise.
评论 #31096632 未加载
gus_massa大约 3 年前
Do you have a screenshot? I can imagine how it looks like, but a screenshot would be nice anyway.
评论 #31095295 未加载
tconfrey大约 3 年前
This came in just as I was about to submit my HackerNew extension to the store so I added it as an optional extra. Thanks @frabert!<p>HackerNew [1] adds a &#x27;hideAll&#x27; button to the HN top bar and an &#x27;Open in new tabs&#x27; control. This is a minimal, non distracting, change which optimizes my workflow of occasionally visiting HN throughout the day to gather a set of interesting stories to drill into but avoiding re-skimming the same stories on every visit. Source available [2]<p>[1] <a href="https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;hackernew&#x2F;ehlfambiaoomgjffbpjmmcaeafjeafgb" rel="nofollow">https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;hackernew&#x2F;ehlfambi...</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;tconfrey&#x2F;HackerNew" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tconfrey&#x2F;HackerNew</a>
sodimel大约 3 年前
I made an update that adds images in urls in comments too.<p>It shows smaller favicons, and it prevents adding new images when going back in history too :)<p><a href="https:&#x2F;&#x2F;gist.github.com&#x2F;frabert&#x2F;48b12088441f6195ea9292c2a5a77e3a?permalink_comment_id=4139060#gistcomment-4139060" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;frabert&#x2F;48b12088441f6195ea9292c2a5a7...</a>
评论 #31100235 未加载
stffndtz大约 3 年前
Am I the only one getting a CSP error on this? (using Brave &amp; Snippets)
mirrorlake大约 3 年前
I personally have no desire to use it, but I appreciate that it&#x27;s a significantly more efficient way of providing more info compared to a thumbnail.<p>This is one of the few places on the web where I&#x27;m not utterly overwhelmed by visual clutter, and I genuinely wish more sites had a &#x27;no images&#x2F;thumbnails&#x27; mode like HN.
andreareina大约 3 年前
N.B. this is going to send a request to duck duck go for every link which (a) some people aren&#x27;t going to like, and (b) DDG might not like (I couldn&#x27;t find any explicit policy for using their favicon service).
评论 #31096031 未加载
评论 #31095696 未加载
评论 #31095767 未加载
soheil大约 3 年前
Links usually don&#x27;t display a favicon next to them only when you open the page the browser tab title does. It&#x27;d be pretty cluttered imo if random images were shown in an otherwise text-based environment.
samber大约 3 年前
I just made a chrome extension: <a href="https:&#x2F;&#x2F;github.com&#x2F;samber&#x2F;refined-hn" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;samber&#x2F;refined-hn</a><p>Publishing request is pending.
评论 #31095805 未加载
hsblhsn大约 3 年前
I made <a href="https:&#x2F;&#x2F;hn.hsblhsn.me" rel="nofollow">https:&#x2F;&#x2F;hn.hsblhsn.me</a> which loads Opengraph data of the linked page as a preview of the content inside.
评论 #31096616 未加载
numbsafari大约 3 年前
This is a great way to leak HN reading to various sites and ad trackers.<p>I&#x27;d prefer to only share that information with sites I click on, and HN itself, of course.
Jimtrim大约 3 年前
Anybody have a Chrome-plugin version of this? Or should I look into making it when I get home? :)
评论 #31096145 未加载
评论 #31095875 未加载
评论 #31095699 未加载
olvy0大约 3 年前
This should be added to Algolia&#x27;s cool apps page:<p><a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;cool_apps" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;cool_apps</a><p>(It&#x27;s linked from the bottom of each search result page, if you search from inside HN).
ziml77大约 3 年前
Is anyone who&#x27;s good with CSS able to modify this to align the icon and text better? The current alignment where the baseline of the text is in line with the bottom of the favicon feels off.
评论 #31097811 未加载
vineshreddy007大约 3 年前
I can imagine how it looks like, but a screenshot would be nice anyway.
评论 #31096539 未加载
secondcoming大约 3 年前
Does DuckDuckGo ensure that the icons are 16x16, or will it serve potentially 10’s or 100’s of KB of image only for my browser to resize them?
评论 #31098198 未加载
gerardes大约 3 年前
nice, i like the idea. Maybe i&#x27;ll add it to my HN extension. <a href="https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;hacker-news-watcher&#x2F;ojkdgdapoebjekbklfpfjlccifecjeoo" rel="nofollow">https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;hacker-news-watche...</a>
duxup大约 3 年前
I&#x27;ve grown to hate icons for lists over time.<p>Visually I find them messy and not helpful for filtering.
iqandjoke大约 3 年前
Nice though didn&#x27;t work with AutoPagerize Chrome extension with page 2 onwards
slk500大约 3 年前
Please dont add any icons any more colors. I love that text-based interface.
评论 #31099061 未加载
GiorgioG大约 3 年前
Neat. I tried it and (surprisingly!) found the icons too distracting.
HeckFeck大约 3 年前
TIL that browsers support .ico format for inline images.