favorite-icon-dot
v1.2.2
Published
Small library for manipulating desktop favicon with red dot
Downloads
158
Readme
🔴 Favorite Icon Dot
Small library for dot manipulating with desktop favicon.
Desktop browser support
- Chrome: ✅
- Edge: ✅
- Firefox: ✅
- Opera: ✅
- IE: ❌
- Safari: ❌ (Safari hides favicons)
Installation
npm install favorite-icon-dot
Demo
Using
import { FaviconDot } from 'favorite-icon-dot';
const dot = new FaviconDot();
dot.show();
Advanced settings
import { FaviconDot } from 'favorite-icon-dot';
const dot = new FaviconDot({
backgroundColor: '#ff0000',
radius: 5,
strokeColor: '#000',
faviconSrc: '/my-icon.png',
positionX: 'right',
positionY: 'bottom'
});
dot.show();
API
.show()
Show dot in favicon.
import { FaviconDot } from 'favorite-icon-dot';
const dot = new FaviconDot();
dot.show(count);
.hide()
Reset the favicon.
import { FaviconDot } from 'favorite-icon-dot';
const dot = new FaviconDot();
// ...
dot.hide();
License
MIT License