From dadc89618d257a64a60c6cca69eb49cef50c759f Mon Sep 17 00:00:00 2001 From: itchylol742 <42976312+itchylol742@users.noreply.github.com> Date: Thu, 18 Oct 2018 15:26:55 -0400 Subject: [PATCH] Support HTTP and HTTPS links (#16) * accept http and https links * support http and https links --- js/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/main.js b/js/main.js index 1d88e19..51b052f 100644 --- a/js/main.js +++ b/js/main.js @@ -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 ) => {