{"id":15711368,"url":"https://github.com/ryohidaka/chrome-badge","last_synced_at":"2026-03-05T05:32:16.240Z","repository":{"id":219718998,"uuid":"749725500","full_name":"ryohidaka/chrome-badge","owner":"ryohidaka","description":"Helper for displaying badges in chrome.action API.","archived":false,"fork":false,"pushed_at":"2025-05-01T23:38:10.000Z","size":930,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T03:14:28.923Z","etag":null,"topics":["badge","chrome","chrome-extension","chrome-extensions","ext"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/chrome-badge","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryohidaka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-29T09:18:05.000Z","updated_at":"2025-03-01T23:11:43.000Z","dependencies_parsed_at":"2024-06-02T00:39:17.401Z","dependency_job_id":"0e4f3175-dd79-40a4-9134-005f3b352a78","html_url":"https://github.com/ryohidaka/chrome-badge","commit_stats":null,"previous_names":["ryohidaka/chrome-badge"],"tags_count":1,"template":false,"template_full_name":"ryohidaka/npm-package-template","purl":"pkg:github/ryohidaka/chrome-badge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-badge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-badge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-badge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-badge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryohidaka","download_url":"https://codeload.github.com/ryohidaka/chrome-badge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fchrome-badge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30111743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["badge","chrome","chrome-extension","chrome-extensions","ext"],"created_at":"2024-10-03T21:12:44.617Z","updated_at":"2026-03-05T05:32:16.217Z","avatar_url":"https://github.com/ryohidaka.png","language":"TypeScript","funding_links":["https://ko-fi.com/B0B6TVH92"],"categories":[],"sub_categories":[],"readme":"# chrome-badge\n\n[![npm version](https://badge.fury.io/js/chrome-badge.svg)](https://badge.fury.io/js/chrome-badge)\n![build](https://github.com/ryohidaka/chrome-badge/workflows/Build/badge.svg)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/B0B6TVH92)\n\n## Overview\n\nHelper for displaying badges in `chrome.action` API.\n\n## Installation\n\nYou can install this library using npm:\n\n```shell\nnpm install chrome-badge\n```\n\n## Methods\n\n### `set`\n\nSets the text color and background color for badge of the action. The badge is displayed on top of the icon.\n\n```typescript\nimport { Badge } from \"chrome-badge\";\n\nconst text = \"999\";\nconst backgroundColor = \"red\";\nconst textColor = \"white\";\n\nBadge.set({ text, textColor, backgroundColor });\n```\n\n### `get`\n\nGets the badge text of the action. If no tab is specified, the non-tab-specific badge text is returned.\n\n```typescript\nimport { Alarm } from \"chrome-alarms\";\n\nconst badge = await Badge.get();\nconsole.log(badge);\n\n// Output:\n//   Object{\n//     backgroundColor: Array(4) [255, 0, 0, 255],\n//     text: \"999\",\n//     textColor: Array(4) [255, 255, 255, 255]\n//   }\n```\n\n## Link\n\n- [chrome.action](https://developer.chrome.com/docs/extensions/reference/api/action)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryohidaka%2Fchrome-badge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryohidaka%2Fchrome-badge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryohidaka%2Fchrome-badge/lists"}