This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

GitHub Star History Badge

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script adds a small badge next to the star count on GitHub repository pages showing how many stars the repo has gained over a selected time period. Instead of just seeing the total star count, you can instantly see the momentum of a project—whether it's gaining stars rapidly, staying steady, or losing interest. The badge shows a trend indicator (e.g., "+42" in green for growth, "-5" in red for decline, or "±0" for steady) followed by the time period (7, 30, or 90 days). A clickable star icon links to star-history.com, where you can view a full interactive chart of the repository's star history. The badge updates automatically when you navigate between repositories, and the data is cached locally to reduce API calls.

WHERE IT RUNS

The script runs on all GitHub repository pages (github.com/*/*). It works on the main repository page, subpages like /pulse, /graphs, and other repo views. It supports both desktop and mobile views.

HOW TO USE

After installation, the settings panel appears on the left side of the screen with the gear emoji (⚙️). Open the panel to configure the script:

- The "Show star history badge" toggle enables or disables the badge.

- Select the time period from the dropdown: 7 days, 30 days, or 90 days.

- Click "Refresh badge" to manually fetch the latest star data.

- Click "View star history" to open star-history.com in a new tab.

The badge appears next to the star count on any GitHub repository page. The color of the trend indicator shows growth (green), decline (red), or steady (gray). Click the 📈 link to view the full star history chart.

TECHNICAL SECTION — REAL MECHANISM

The script detects GitHub repository pages by matching the URL pattern github.com/owner/repo. It extracts the current star count from the page by looking for elements like .Counter, .social-count, .js-social-count, or by parsing the text of the star button container. The repository owner and name are extracted from the URL. Historical star data is fetched using GM_xmlhttpRequest from the star-history.com API (https://api.star-history.com/json?owner={owner}&name={repo}). The response contains an array of timestamp-star count pairs. The script finds the star count at the beginning of the selected period (e.g., 30 days ago) and the current count, calculating the net gain. The data is cached in a JavaScript object with a 10-minute TTL to avoid repeated API calls. The badge is created as an inline-flex span with the trend text and a link to the star history page, inserted next to the star button. The badge uses style properties and textContent (never innerHTML). A MutationObserver watches for page navigation and triggers badge updates when the user moves between repositories.

THE PANEL

The settings panel is built with BotGentz's BGPanel component. It is draggable via its header, allowing you to reposition it anywhere on the screen. The panel snaps to the left edge by default but can be moved freely. Click the gear emoji to collapse the panel into a small bubble, and click the bubble to expand it again. The panel remembers its position per page session. Press the Escape key to quickly close or minimize the panel. The panel includes a status flash bar that provides visual feedback when settings are changed or actions are performed. All settings save automatically via GM_setValue.

PLEASE NOTE

This script requires the free BotGentz browser extension to run. It does not function as a standalone Chrome extension and does not use chrome.* APIs. The script uses the star-history.com API to fetch star history data. If the API is unavailable, the script falls back to simulated data. GitHub frequently updates its page structure, which may affect the selectors used to extract the current star count. If the badge stops appearing, please check for script updates. The script caches star data locally for 10 minutes to reduce API calls. The script stores only your preferences via GM_setValue. No data is sent externally except for the API request to star-history.com. The script never reads or writes password fields, hidden inputs, or file inputs. All DOM operations use safe methods (style properties, textContent, appendChild) and never use innerHTML.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.