favorite-icon-status
v1.2.3
Published
Small library for status manipulating desktop favicon
Downloads
4
Readme
⚠️ Favorite Icon Status
Small library for status manipulating with desktop favicon.
Desktop browser support
- Chrome: ✅
- Edge: ✅
- Firefox: ✅
- Opera: ✅
- IE: ❌
- Safari: ❌ (Safari hides favicons)
Installation
npm install favorite-icon-status
Demo
Using
import { FaviconStatus } from 'favorite-icon-status';
const status = new FaviconStatus();
status.set('ok'); // 'ok', 'error' or 'warning'
Advanced options
import { FaviconStatus } from 'favorite-icon-status';
const status = new FaviconStatus({
faviconSrc: '/icons/favicon.png'
});
status.set('ok'); // 'ok', 'error' or 'warning'
API
.set(status: 'ok' | 'error' | 'warning')
Set the favicon with status.
import { FaviconStatus } from 'favorite-icon-status';
const status = new FaviconStatus();
status.set('ok'); // 'ok', 'error' or 'warning'
.reset()
Reset the favicon.
import { FaviconStatus } from 'favorite-icon-status';
const status = new FaviconStatus();
// ...
status.reset();
License
MIT License