JSFiddle - React, Tailwind, and code Playground
by kachibito
HTML
<a href=http://github.com>GitHub</a>
<a href=http://css-tricks.com>CSS-Tricks</a>
<a href=http://www.google.com>Google</a>
<a href=http://jsfiddle.net/chriscoyier/6Vg7t/3/>JSfiddle</a>
<a href=http://kachibito.net/>kachibito</a>
CSS
a { display: block; text-decoration: none; padding: 5px; }
JavaScript
$('a[href^="http://"]').filter(function() {
return this.hostname && this.hostname !== location.hostname;
}).each(function(){
var l = $(this);
var fu =
l.attr('href').replace(/^(http:\/\/[^\/]+).*$/, '$1') + '/favicon.ico';
var fi = $('<img src="favicon.png" alt="favicon" />')['prependTo'](l);
var e = new Image();
e.src = fu;
if (e.complete) fi.attr('src', fu);
else e.onload = function(){
fi.attr('src', fu);
};
});