Update js/main.js

commit review suggestion

Co-authored-by: Samar Dhwoj Acharya <coolsamar207@gmail.com>
This commit is contained in:
anzz1 2022-10-21 19:31:06 +03:00 committed by GitHub
parent 65f0aba0c6
commit 8e88796c63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -112,10 +112,10 @@ function fetchAndShow(repo) {
repo = repo.replace('https://github.com/', '');
repo = repo.replace('http://github.com/', '');
repo = repo.replace(/\.git$/, '');
repo = repo.replace(/^\s+/,''); // remove leading whitespace
repo = repo.replace(/\s+$/,''); // remove trailing whitespace
repo = repo.replace(/^\/+/,''); // remove leading slashes
repo = repo.replace(/\/+$/,''); // remove trailing slashes
repo = repo.replace(/^\s+/, ''); // remove leading whitespace
repo = repo.replace(/\s+$/, ''); // remove trailing whitespace
repo = repo.replace(/^\/+/, ''); // remove leading slashes
repo = repo.replace(/\/+$/, ''); // remove trailing slashes
fetch(
`https://api.github.com/repos/${repo}/forks?sort=stargazers&per_page=100`