您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
在 github 搜索和存储库页面上的存储库名称旁边添加存储库大小
当前为
# [](mailto:[email protected])人民的勤务员/UserScripts
[](http://greasyfork.icu/users/1169082)






[](https://github.com/qinwuyuan-cn/)
[](https://github.com/qinwuyuan-cn/)
[](https://github.com/qinwuyuan-cn/UserScripts)
[](https://github.com/qinwuyuan-cn/UserScripts)
[]( https://github.com/qinwuyuan-cn/UserScripts/issues)







A userscript that adds the size of Github repositories to the search results and repository pages.
## Preview


## Prerequisites
To use this script, you will need a userscript manager. Some popular choices are:
- [Tampermonkey](https://tampermonkey.net/) (Chrome, Firefox, Safari, Microsoft Edge, Opera Next)
- [Violentmonkey](https://violentmonkey.github.io/) (Chrome, Firefox, Microsoft Edge)
- [Greasemonkey](https://www.greasespot.net/) (Firefox)
- [Userscripts](https://apps.apple.com/us/app/userscripts/id1463298887) (Safari)
## Installation
1. Install Tampermonkey or your preferred userscript manager.
2. Install the script from [here](http://greasyfork.icu/scripts/458048-github-repo-size/code/Github%20Repo%20Size.user.js).
3. (Optional) If you want to view the sizes of private repositories, see the instructions below.
## View Private Repositories Size
By default, this script will only display the sizes of public repositories.
To display the sizes of private repositories, you will need to generate a new personal access token with the `repo` scope.
This token will be used to authenticate with the Github API.
1. Generate a new token [here](https://github.com/settings/tokens/new?description=repo-size%20userscript&scopes=repo).
2. Give the token a name and check the `repo` scope.
3. Click on the `Generate token` button and copy the token.
4. Replace the value of the `TOKEN` constant at the top of the script with the token you just generated.
## Usage
This script will automatically run on Github search pages and repository pages, and will display the repository size next to the repository name.
## Change description
Fix the problem of failure in search page
Fixed the issue of not displaying when viewing other warehouses (increased delay)
## grateful
The script is modified from the user **[mshll](http://greasyfork.icu/zh-CN/users/1010122)**'s script [Github Repo Size](http://greasyfork.icu/scripts/458048) Thanks to the original The **hard work** and **wisdom** of the author **mshll**