Live data from Hacker News

Show HN: Favicons for HN

gist.github.com

11–20 of 73 posts

Re: Show HN: Favicons for HN

#14
post #4

Anybody have a Chrome-plugin version of this? Or should I look into making it when I get home? :)

Install GreaseMonkey. It’s a script you add yourself :)

Getting the same error as mentioned in another comment.... might just make it myself later, with some local cache to not blast DuckDuckGo on site refresh

Re: Show HN: Favicons for HN

#15

N.B. this is going to send a request to duck duck go for every link which (a) some people aren't going to like, and (b) DDG might not like (I couldn't find any explicit policy for using their favicon service).

That's true, and if people don't like the idea of sending requests to DDG I completely understand. However regarding the increase in traffic: doing any kind of search on DDG sends a request for each link just like this script does, and I don't think the amount of users that are going to use this script is going to cause major issues. Still, it's a grey area and its use is not endorsed by DDG in any way.

Re: Show HN: Favicons for HN

#17
post #10

N.B. this is going to send a request to duck duck go for every link which (a) some people aren't going to like, and (b) DDG might not like (I couldn't find any explicit policy for using their favicon service).

This - an alternative approach could be to create the images with a URL of '{domain}/favicon.ico' and then add an onError event to switch the URL to the DDG URL only for instances where the site's favicon isn't in the default location.

Many sites have png favicons that may be stored anywhere. You kind of need to parse the HTML to be sure, and I guess that's what the DDG service does.

Re: Show HN: Favicons for HN

#18
post #6

Doesn’t work (at least for me in Chrome with Tampermonkey) due to Hacker News’s Content-Security-Policy header. > Refused to load the image ' ' because it violates the following Content Security Policy directive: "img-src data: 'self' ". Overriding this would probably require an extension with a Service Worker that edits the CSP header.

It's possible that GreaseMonkey on Firefox has different policies than other extensions on Chrome

Re: Show HN: Favicons for HN

#19
post #10

N.B. this is going to send a request to duck duck go for every link which (a) some people aren't going to like, and (b) DDG might not like (I couldn't find any explicit policy for using their favicon service).

This - an alternative approach could be to create the images with a URL of '{domain}/favicon.ico' and then add an onError event to switch the URL to the DDG URL only for instances where the site's favicon isn't in the default location.

I actually have this exact thought (just without the fallback) a few minutes ago.
Post reply on HN