A Chrome extension that maps GitHub usernames to "username(nickname)" format
Features • Quick Start • Configuration • Development • 中文
Full feature guide and management instructions: Features & Management Guide
- 🔄 Multiple Data Sources - Configure multiple JSON URLs, data auto-merges with deduplication by GitHub username
- ⏰ Auto Update - Optional daily auto-update from all enabled data sources
- 📝 Local Rules - Manually add local mapping rules with higher priority
- 🎯 Smart Replacement - Only active on GitHub, intelligently identifies usernames
- 🎛️ Control Panel - Standalone configuration interface with data preview and search
- 🌐 CORS Support - Load JSON from any URL without CORS restrictions
- 💬 Mention Autocomplete - Type
@@or pressCtrl+Shift+Mto quickly mention team members by nickname
After enabling the extension, GitHub usernames will be displayed with nicknames.
| Original | Replaced |
|---|---|
zhangsan-dev |
zhangsan-dev(Zhang San) |
💡 Hover to see full info (domain account, email, etc.)
Detailed installation guide with screenshots: Installation Guide
-
Download
git clone https://github.com/MizuhaHimuraki/github-name-mapper.git
-
Load in Chrome
- Open
chrome://extensions/ - Enable Developer mode
- Click Load unpacked and select the folder
- Open
-
Configure
- Click extension icon -> Control Panel
- Add one or more JSON URLs in "Data Source Config"
- Click Load All or load each source individually
The extension accepts any of the following response shapes:
{ "data": { "list": [...] } }(recommended / default example){ "developers": [...] }{ "list": [...] }[...](plain array)
Recommended format:
{
"code": 200,
"data": {
"total": 10,
"list": [
{
"domain": "zhangsan",
"nickname": "Zhang San",
"account": "zhangsan-dev",
"email": "zhangsan@example.com"
}
]
},
"success": true
}| Field | Description | Required |
|---|---|---|
account |
GitHub username | ✅ |
nickname |
Nickname/Alias | ✅ |
domain |
Domain account | ❌ |
email |
Email address | ❌ |
The extension can load mapping data from any reachable JSON URL. Common hosting options:
- GitHub Pages (
github.io, recommended for teams): publish adata.jsonas a static file and use a URL likehttps://<your-user>.github.io/<repo>/data.json. For the full step-by-step guide, seedocs/gh-pages/README.md(this repo includes an example atdocs/gh-pages/data.json). Live example: https://mizuhahimuraki.github.io/github-name-mapper/gh-pages/data.json. - Any static hosting: put
data.jsonon Nginx/Apache, OSS/S3-compatible storage, Netlify/Vercel, etc. - GitHub raw / Gist raw: host a single JSON file and use its “raw” URL (note: some providers may cache).
- This repo’s minimal backend (LAN/local): run
backend/server.mjs(or Docker) to serve/data.jsonand provide a stable URL in your local network. Seebackend/README.md.
github-name-mapper/
├── manifest.json # Extension config
├── background.js # Service Worker
├── content.js # Content script
├── popup.html/js/css # Popup panel
├── options.html/js/css # Options page
├── docs/ # Documentation & Images
└── icons/ # Icon files
- Edit code, then click Refresh on extension card at
chrome://extensions/ - Refresh GitHub page to see changes
- Press
F12to open DevTools for debugging
The extension auto-checks GitHub Releases every 12 hours.
git tag v1.0.1
git push origin v1.0.1GitHub Actions will automatically create a release with the packaged ZIP file.
- DingTalk integration (requires internal service)
This extension respects your privacy and does not collect any personal data. All configuration and mapping data is stored locally in your browser.
For details, see our Privacy Policy.
MIT License © 2025 MizuhaHimuraki
将 GitHub 用户名映射为「用户名(花名)」格式显示的 Chrome 扩展
完整功能介绍与管理指南:功能特性与管理指南
- 🔄 多数据源支持 - 可配置多个 JSON URL,数据自动合并(按 GitHub 用户名去重)
- ⏰ 每日自动更新 - 可选择启用每天自动从所有启用的数据源更新数据
- 📝 本地规则 - 支持手动添加本地映射规则,优先级高于远程数据
- 🎯 精准替换 - 仅在 GitHub 网站启用,智能识别并替换用户名
- 🎛️ 控制面板 - 独立的配置管理界面,支持数据预览和搜索
- 🌐 跨域支持 - 支持从任意 URL 加载 JSON 数据,无需担心 CORS 限制
- 💬 Mention 自动补全 - 输入
@@或按Ctrl+Shift+M快速通过花名提及团队成员
插件启用后,GitHub 页面上的用户名会变成:
| 原始显示 | 替换后显示 |
|---|---|
zhangsan-dev |
zhangsan-dev(张三) |
💡 鼠标悬停会显示完整信息(域账号、邮箱等)
带截图的详细安装教程:安装指南
-
下载扩展
git clone https://github.com/MizuhaHimuraki/github-name-mapper.git
-
加载到 Chrome
- 访问
chrome://extensions/ - 开启「开发者模式」
- 点击「加载已解压的扩展程序」并选择文件夹
- 访问
-
配置数据源
- 点击扩展图标 -> 「控制面板」
- 在「数据源配置」中添加一个或多个 JSON URL
- 点击「全部加载」或单独加载每个数据源
为方便接入各种数据源,插件支持以下任一返回格式:
{ "data": { "list": [...] } }(推荐/默认示例){ "developers": [...] }{ "list": [...] }[...](直接数组)
推荐格式:
{
"code": 200,
"data": {
"total": 10,
"list": [
{
"domain": "zhangsan",
"nickname": "张三",
"account": "zhangsan-dev",
"email": "zhangsan@example.com"
}
]
},
"success": true
}| 字段 | 说明 | 必填 |
|---|---|---|
account |
GitHub 用户名 | ✅ |
nickname |
花名/昵称 | ✅ |
domain |
域账号/工号 | ❌ |
email |
邮箱地址 | ❌ |
⚠️ account和nickname至少需要填写一个
插件支持从任意可访问的 JSON URL加载数据源,常见的托管方式如下:
- GitHub Pages(
github.io,团队推荐):把data.json作为静态文件发布,并使用类似https://<你的用户名>.github.io/<仓库名>/data.json的地址。完整的手把手教程见docs/gh-pages/README.md(本仓库已提供示例:docs/gh-pages/data.json)。已部署示例:https://mizuhahimuraki.github.io/github-name-mapper/gh-pages/data.json。 - 任意静态托管:把
data.json放在 Nginx/Apache、OSS/S3 兼容对象存储、Netlify/Vercel 等静态站点上。 - GitHub raw / Gist raw:只维护一个 JSON 文件,直接使用其 raw 地址(注意:部分平台可能有缓存)。
- 本仓库自带极简后端(内网/本地):运行
backend/server.mjs(或 Docker)提供/data.json,在内网给插件一个稳定地址。详见backend/README.md。
- 进入控制面板 → 「本地规则」标签
- 填写 GitHub 用户名和花名
- 点击添加
也可以使用「导入 / 导出」按钮批量管理本地规则:
- 导出文件格式为:
{ "localRules": [ { "domain", "nick", "github_name", "github_acc" } ] } - 导入时支持上述格式,或直接传入规则数组
github-name-mapper/
├── manifest.json # 扩展配置文件
├── background.js # 后台服务脚本 (Service Worker)
├── content.js # 内容注入脚本
├── content.css # 替换样式
├── popup.html/js/css # 弹出面板
├── options.html/js/css # 控制面板
├── docs/ # 文档与图片
└── icons/ # 图标文件
- 修改代码后,在
chrome://extensions/点击 刷新 - 刷新 GitHub 页面查看效果
- 按
F12打开开发者工具
- 每 12 小时自动检查一次
- 发现新版本时,popup 面板会显示更新提示
git tag v1.0.1
git push origin v1.0.1- 钉钉跳转联系用户(需要内部服务中转)
本扩展尊重您的隐私,不收集任何个人数据。所有配置和映射数据都存储在您的浏览器本地。
详情请见 隐私政策。
欢迎提交 Issue 和 Pull Request!
MIT License © 2025 MizuhaHimuraki
