mirror of
https://github.com/techgaun/active-forks.git
synced 2024-12-22 13:32:14 +01:00
Update js/main.js
commit review suggestion Co-authored-by: Samar Dhwoj Acharya <coolsamar207@gmail.com>
This commit is contained in:
parent
65f0aba0c6
commit
8e88796c63
1 changed files with 4 additions and 4 deletions
|
@ -112,10 +112,10 @@ function fetchAndShow(repo) {
|
||||||
repo = repo.replace('https://github.com/', '');
|
repo = repo.replace('https://github.com/', '');
|
||||||
repo = repo.replace('http://github.com/', '');
|
repo = repo.replace('http://github.com/', '');
|
||||||
repo = repo.replace(/\.git$/, '');
|
repo = repo.replace(/\.git$/, '');
|
||||||
repo = repo.replace(/^\s+/,''); // remove leading whitespace
|
repo = repo.replace(/^\s+/, ''); // remove leading whitespace
|
||||||
repo = repo.replace(/\s+$/,''); // remove trailing whitespace
|
repo = repo.replace(/\s+$/, ''); // remove trailing whitespace
|
||||||
repo = repo.replace(/^\/+/,''); // remove leading slashes
|
repo = repo.replace(/^\/+/, ''); // remove leading slashes
|
||||||
repo = repo.replace(/\/+$/,''); // remove trailing slashes
|
repo = repo.replace(/\/+$/, ''); // remove trailing slashes
|
||||||
|
|
||||||
fetch(
|
fetch(
|
||||||
`https://api.github.com/repos/${repo}/forks?sort=stargazers&per_page=100`
|
`https://api.github.com/repos/${repo}/forks?sort=stargazers&per_page=100`
|
||||||
|
|
Loading…
Reference in a new issue