📜 ⬆️ ⬇️

Tinyicon - favicon counter on js

Tinyicon is a small library for manipulating the site favicon to transfer information about new events. For browsers that do not support canvas, the counter is displayed on the title page.

image


Using


Using it is easy. We connect and write
Tinycon.setBubble(6); 

The library also supports options such as the choice of color, font, and counter positioning:
 Tinycon.setOptions({ width: 7, height: 9, font: '10px arial', colour: '#ffffff', background: '#549A2F', fallback: true }); 

')
I would like to draw your attention to the fallback parameter, which is responsible for displaying the counter in the title of the page for unsupported browsers.

Supported browsers


Tinycon has been tested and works in the following browsers:
In the following browsers, the counter can only be displayed in title:

Demo | Project repository on gihub.

PS My counter is incorrectly displayed in Chrome 17 and there is no title update in IE9.

Source: https://habr.com/ru/post/139806/


All Articles