{"id":20388167,"url":"https://github.com/fallaciousreasoning/badgable-favicon","last_synced_at":"2025-07-02T13:33:35.337Z","repository":{"id":57233544,"uuid":"200144694","full_name":"fallaciousreasoning/badgable-favicon","owner":"fallaciousreasoning","description":"A WebComponent for applying a badge to a favicon","archived":false,"fork":false,"pushed_at":"2022-07-20T12:44:30.000Z","size":160,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T03:07:12.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fallaciousreasoning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-02T01:44:06.000Z","updated_at":"2023-09-06T11:10:23.000Z","dependencies_parsed_at":"2022-08-31T14:11:36.943Z","dependency_job_id":null,"html_url":"https://github.com/fallaciousreasoning/badgable-favicon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fallaciousreasoning%2Fbadgable-favicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fallaciousreasoning%2Fbadgable-favicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fallaciousreasoning%2Fbadgable-favicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fallaciousreasoning%2Fbadgable-favicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fallaciousreasoning","download_url":"https://codeload.github.com/fallaciousreasoning/badgable-favicon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241940529,"owners_count":20045878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T03:07:42.684Z","updated_at":"2025-03-04T23:41:45.147Z","avatar_url":"https://github.com/fallaciousreasoning.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Badgable FavIcon\n\nThis project makes it possible to badge the favicon of the current page. You can play with a demo [here](https://fallaciousreasoning.github.io/badgable-favicon/).\n\n## Usage\n\nInclude the \"FavIconBadge.js\" file in your project.\n\nRun\n```\nnpm install favicon-badge\n```\n\nand then, if using WebPack:\n```js\nimport \"FavIconBadge\";\n```\n\nor if using VanillaJS\n\n```html\n\u003cscript type=\"text/javascript\" src=\"path/to/FavIconBadge.js\"\u003e\u003c/script\u003e\n```\n\nTo use, simply add a `\u003cfavicon-badge/\u003e` tag to the `\u003chead\u003e` of your document.\n\n```html\n\u003c!-- Badges the favicon for the current page with a '1' --\u003e\n\u003cfavicon-badge src=\"/favicon.png\" badge=\"1\" /\u003e\n```\n\n## API\n\nThe API provides methods for controlling and customizing the badge.\n\n| Attribute          | Type       | Description                                                                                                  |\n|--------------------|------------|--------------------------------------------------------------------------------------------------------------|\n| src                | `string`   | The url of the favicon to display. This must be set in order for a favicon to be displayed.                  |\n| badge              | `string` \\|`int` \\|`boolean`|The badge to display. See [badge values](#badge-values) for more detail.                   |\n| badgeColor         | `string`   | A string representing the color of the badge. Defaults to `#FF0000`. Not used if `badgeBackgroundSrc is set. |\n| textColor          | `string`   | A string represnting the color of the text on the badge. Defaults to `#000000`.                              |\n| badgeBackgroundSrc | `string`   | Url for an image to display as the badge background. Used instead of `badgeColor`.                           |\n| badgeSize          | `number`   | The size of the badge. Should be between `0` and `16`. Defaults to `10`.                                     |\n\n### Badge Values\n\nAn attempt has been made to provide sensible defaults for different badge values.\n\n| Badge Value | Shows Badge | Shows Text |\n|-------------|-------------|------------|\n| `\"\"`        | Y           | N          |\n| `true`      | Y           | N          |\n| `false`     | N           | N          |\n| `0`         | N           | N          |\n| `[1-9]`     | Y           | Y          |\n| `\"\\w+\"`     | Y           | Y          |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffallaciousreasoning%2Fbadgable-favicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffallaciousreasoning%2Fbadgable-favicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffallaciousreasoning%2Fbadgable-favicon/lists"}