Lytol (owner)

Revisions

gist: 140481 Download_button fork
public
Public Clone URL: git://gist.github.com/140481.git
Embed All Files: show embed
JavaScript #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$(document).ready(function(){
    
    // Add a favicon to all links with class name favicon
    //
    $("a.favicon").each(function() {
        this.style.paddingLeft = '25px';
        this.style.background = 'transparent url(' + faviconFromLink(this) + ') no-repeat top left';
    });
    
});
 
function faviconFromLink(link) {
    var googleFaviconBaseURL = "http://www.google.com/s2/favicons?domain=";
    return (googleFaviconBaseURL + link.hostname);
}