mirror of
https://github.com/techgaun/active-forks.git
synced 2024-12-22 13:32:14 +01:00
Support HTTP and HTTPS links (#16)
* accept http and https links * support http and https links
This commit is contained in:
parent
0eb199559e
commit
dadc89618d
1 changed files with 4 additions and 0 deletions
|
@ -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 ) => {
|
||||
|
|
Loading…
Reference in a new issue