Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrishunt/favcount
Enhance your useless favicon with FavCount technology
https://github.com/chrishunt/favcount
Last synced: about 2 months ago
JSON representation
Enhance your useless favicon with FavCount technology
- Host: GitHub
- URL: https://github.com/chrishunt/favcount
- Owner: chrishunt
- License: mit
- Created: 2013-08-18T07:02:13.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-11T15:50:48.000Z (over 9 years ago)
- Last Synced: 2024-07-19T00:40:00.348Z (2 months ago)
- Language: JavaScript
- Homepage: http://chrishunt.co/favcount
- Size: 514 KB
- Stars: 183
- Watchers: 10
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# [favcount.js](http://chrishunt.co/favcount)
Enhance your useless favicon with **FavCount™** technology.
[chrishunt.co/favcount](http://chrishunt.co/favcount)
## Usage
Load up `favcount.js` in your HTML.
```html
...
```
Create and use a `Favcount` in your JavaScript.
```javascript
var favicon = new Favcount('path/to/favicon.ico');favicon.set(10);
```If you want to make that icon really pop, change it out to something else or
adjust the opacity.```javascript
favicon.icon = 'path/to/different/icon.ico';
favicon.opacity = 0.5;favicon.set();
```## Example
Have a look at the favicon for the [home page](http://chrishunt.co/favcount).
Notice how amazing it is? Here's the code.```javascript
var favicon = new Favcount('icons/blue-dot.ico');function setCount(count) {
if (count > 99) { count = 1 };favicon.set(count);
setTimeout(function() {
setCount(count + 1);
}, 500);
}setCount(1);
```## License
[MIT License](https://github.com/chrishunt/favcount/blob/master/LICENSE)