From 9d2820f810ba42c09dd3f42eb4b1e717b8722301 Mon Sep 17 00:00:00 2001 From: Rabin Shrestha Date: Wed, 1 Jul 2020 21:26:08 +0545 Subject: [PATCH] - remove string '.git' but not 'git' from end --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index a4e1ebb..7c78297 100644 --- a/js/main.js +++ b/js/main.js @@ -99,7 +99,7 @@ function initDT() { function fetchAndShow(repo) { repo = repo.replace('https://github.com/', ''); repo = repo.replace('http://github.com/', ''); - repo = repo.replace(/.git$/, ''); + repo = repo.replace(/\.git$/, ''); fetch( `https://api.github.com/repos/${repo}/forks?sort=stargazers&per_page=100`