Skip to content

Latest commit

 

History

History
111 lines (74 loc) · 3.99 KB

File metadata and controls

111 lines (74 loc) · 3.99 KB

GitHub Star Marker

日本語 | English

GitHub Star Marker is a browser extension that shows whether you have already starred repositories displayed on GitHub user and organization pages.

Starred repositories get a small yellow star next to the repository name. Unstarred, loading, and unavailable states use a quieter marker so the extension stays close to GitHub's native UI.

Features

  • Marks starred repositories in GitHub pinned repositories
  • Marks starred repositories in organization repository lists
  • Uses GitHub GraphQL API viewerHasStarred for accurate checks
  • Stores a GitHub Personal Access Token from the extension options page
  • Caches recent results to reduce repeated API calls
  • Builds for Chrome and Firefox

Supported Pages

  • https://github.com/<user>
  • https://github.com/<org>
  • https://github.com/<user>?tab=repositories
  • https://github.com/<org>?tab=repositories
  • https://github.com/orgs/<org>/repositories

If GitHub changes its DOM or page layout, the marker placement may need to be updated.

Installation

For normal use, you do not need to clone this repository.

  1. Open Releases.
  2. Download the Chrome asset named github-star-marker-<version>-chrome.zip from the latest release.
  3. Unzip the downloaded file.
  4. Open chrome://extensions/ in Chrome.
  5. Enable Developer mode.
  6. Choose Load unpacked and select the unzipped folder.

For Firefox testing, download and unzip github-star-marker-<version>-firefox.zip, then open about:debugging, choose Load Temporary Add-on, and select the unzipped manifest.json.

Developer Setup

bun install
bun run build

In Chrome, load dist/chrome-mv3 as an unpacked extension.

To build for Firefox:

bun run build:firefox

Then load the generated Firefox output dist/firefox-mv2 from about:debugging.

Development

Chrome development server:

bun run dev

Firefox development server:

bun run dev:firefox

Type check:

bun run typecheck

GitHub Token

Open the extension options page and save a GitHub Personal Access Token.

How to Create a Personal Access Token

  1. Open GitHub's fine-grained personal access token creation page.
  2. Choose the Resource owner that owns the repositories you want to check.
  3. For Repository access, choose public repositories if you only want to check public repositories. For private repository checks, select only the private repositories you need.
  4. Under Account permissions, grant Starring: Read.
  5. For Repository permissions, the default metadata read access is enough for public repository lookup. For private repositories, grant the minimum read access required for those repositories.
  6. Copy the generated token and save it from the extension options page. The save check also verifies that the token can read viewer.login.

If you use a classic token, public repositories can usually be checked without additional scopes. For private repositories, the repo scope may be required. Fine-grained tokens are recommended because they can be limited to specific repositories.

The token is stored locally using chrome.storage.local / browser.storage.local equivalent storage. It is only used for GitHub API requests.

How It Works

  1. The content script extracts owner/repo values from repository links on GitHub pages.
  2. It sends { type: "CHECK_STARRED", repos: string[] } to the background script.
  3. The background script batches requests to the GitHub GraphQL API.
  4. The extension renders a star next to each repository name based on viewerHasStarred.
  5. Results are cached briefly to avoid excessive duplicate checks during GitHub page transitions and re-renders.

Notes

  • GitHub Enterprise Server is not currently supported.
  • Marker rendering may break if GitHub changes its page structure.
  • Firefox builds may show WXT warnings about Firefox manifest requirements.

License

MIT