- remove string '.git' but not 'git' from end

This commit is contained in:
Rabin Shrestha 2020-07-01 21:26:08 +05:45
parent 1e3639abf4
commit 9d2820f810

View file

@ -99,7 +99,7 @@ function initDT() {
function fetchAndShow(repo) { 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$/, '');
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`