Chrome Extension: Starify Github project links

Chrome Extension: Starify Github project links

posted in javascript on  •  • last updated on

A free and open source Chrome Extension that adds Github stars badges to all links on a web page.


Before: https://github.com/sindresorhus/awesome
After: sindresorhus/awesome sindresorhus/awesome


Runs automatically on certain pages like Google search results, StackExchange questions, on Github itself and on Package Manager registries.

Control + Alt + G : Activate on any other page

More Examples

Google Search Results

Github Awesome List

Source

Fork the project and modify the source if you want different behavior because… Well there isn’t some sort of settings page :)

Find these variables at the top of github-stars.user.js:

// Execute directly on pages matching one of these:
const activateDirectlyOn = [
  'https://stackoverflow.com', 'https://superuser.com', 'https://askubuntu.com',
  'https://serverfault.com', /^https:\/\/.*\.stackexchange\.com/,
  /^https:\/\/(www.)?google\..*\/search/, 'https://www.bing.com',
  'https://github.com', 'https://www.npmjs.com/package', 'https://www.nuget.org/packages',
];

// Otherwise wait for Control + Alt + G:
const isTheHotkey = e => e.ctrlKey && e.altKey && e.code === 'KeyG';

// Shoutout to Shields.io for kindly providing the badges!
const badgeUrl = 'https://img.shields.io/github/stars/{userName}/{repoName}.svg?style=social&label=Star';

Stuff that came into being during the making of this post
Other interesting reads
Updates
  • 17 March 2024 : Fix for Google layout. Updated to manifest.json v3.
Tags: product