# j-FaviconUnread

> j-FaviconUnread: NEW badge {Boolean} optional, enables usage of navigator.setAppBadge() (default: true)

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: e85bbffc5ac16797818516a34d4f92c9d67ebfeeade3134935cbbdb3c88386d1
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

__Configuration__

- `fg {String}` foreground color (default: `white`)
- `bg {String}` backround color (default: `red`)
- `selector {String}` optional, selector for a specific image element (default: `favicon` in `head` of HTML)
- __NEW__ `badge {Boolean}` optional, enables usage of `navigator.setAppBadge()` (default: `true`)

Use it with `<ui-component name="faviconunread">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<!-- REMOVE "selector:#favicon" IN YOUR PROJECT!!! -->
<ui-component name="faviconunread" path="common.unread" config="selector:#favicon"></ui-component>

<div>
	<img src="/favicon.ico" id="favicon" />
</div>

<script>
	SET('common.unread', 4, 2000);
</script>
```
