Support HTTP and HTTPS links (#16)

* accept http and https links

* support http and https links
This commit is contained in:
itchylol742 2018-10-18 15:26:55 -04:00 committed by Samar Dhwoj Acharya
parent 0eb199559e
commit dadc89618d
1 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,10 @@ function initDT() {
}
function fetchAndShow( repo ) {
repo = repo.replace('https://github.com/', '');
repo = repo.replace('http://github.com/', '');
repo = repo.replace('.git', '');
fetch( `https://api.github.com/repos/${repo}/forks?sort=stargazers` )
.then( ( response ) => {