🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Favicon Prefixer is a small jQuery plugin used to automatically fetch and display favicons next to your links or link text using Yandex API.

Favicon

Documentation

jquery.faviconPrefixer.js

Sets favicon images next to links by doing only one Request.

Demo

Usage

$("a,  i[data-host]").faviconPrefixer(); 

Available options (defaults)

{     // Favicon API     apiURL: "//favicon.yandex.net/favicon/",      // ClassName of the favicon icon     iconClassName: "favicon-icon",      // use any jquery append method     glueMethod: "prepend",      // modify the link filter to your needs     linkFilter: function(anchor) {         var host = node.host || (node.dataset ? node.dataset.host : "");         if (!host || host === "") {             return;         }         // Return the hostname         return host;     }      } 

Contributing

Before sending a pull request remember to follow jQuery Core Style Guide.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Make your changes on the src folder, never on the dist folder.
  4. Commit your changes: git commit -m 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :D

You May Also Like