https://github.com/codedotjs/repocount
:100: Count repository of a github user [ count < 200 ]
https://github.com/codedotjs/repocount
Last synced: 7 months ago
JSON representation
:100: Count repository of a github user [ count < 200 ]
- Host: GitHub
- URL: https://github.com/codedotjs/repocount
- Owner: CodeDotJS
- Created: 2015-12-27T02:16:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-21T01:51:04.000Z (over 9 years ago)
- Last Synced: 2025-03-20T00:41:19.347Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## RepoCount
> A small javascript snippet to show the exact number of forked, genuine and total repository by a github user.
## Running
> Paste the below code in your chrome console and hit enter.
```js
function countRepos() {
var totalRepos = document.getElementsByClassName("repo-list-item");
var nums = 0;
for (var i = 0; i.length < totalRepos.length; i++) {
nums += 1;
}
var forkedRepos = document.getElementsByClassName("repo-list-info");
var forks = 0;
for (var n = 0; n.length < forkedRepos.length; n++) {
forks += 1;
}
var mineRepos = (totalRepos.length - forkedRepos.length);
return "Total Reposiories :" + " " + totalRepos.length + "\n" +
"Forked Repositories :" + " " + forkedRepos.length + "\n" +
"Original Repositories :" + " " + mineRepos;
}
console.log(countRepos());
```
## NOTE
```
Before, this code used to work for all the github users.
But now, github shows only 200 repository of a user on single page.
So, this code will work only if the user has 200 repositories.
```