Favbadge is a Javascript plugin that will overlay a numeric badge over your current favicon.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
dist
src
test
LICENSE.txt
README.md
build.xml

README.md

#Favbadge

Favbadge is a Javascript plugin that will overlay a numeric badge over your current favicon.

##Usage

Include the following in the <head> of your document:

<script type="text/javascript" src="../dist/favbadge.min.js"></script>

To initialize the plugin, add the following to your document:

<script tytpe="text/javascript">
	Favbadge.init();
</script>

To update the badge, call this function from your application:

Favbadge.badge(num);

Where num is any number, 0 - 99. (Numbers higher than 99 will round down to 99).

To clear the badge and revert back to your default favicon, set num to false.

##Configuration

There are a number of configurable aspects of this plugin.

###Color

To adjust the text color of the number in the badge, access the variable directly:

Favbadge.color = "white";

###Background

To adjust the background color of the badge, change the variable:

Favbadge.backgroundColor = "black";

##Tested Environments

Tested and working on:

  • Google Chrome (Mac)
  • Opera (Mac)

###Pending Support

  • Firefox (Mac + PC)

###Unsupported

  • Internet Explorer