Only replace .git if it occurs at the end. (#37)
Previously, foo/bar.github.io would be turned into foo/barhub.io.
This commit is contained in:
parent
ccea7c3df7
commit
c86de7b089
|
@ -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`
|
||||||
|
|
Loading…
Reference in New Issue