Created
November 26, 2019 16:00
-
-
Save oznotes/78d4bde21c1c766b44fdf44ef0b67c77 to your computer and use it in GitHub Desktop.
Latest Repo Download
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GetRepo() { | |
var link; | |
var RepoLink = 'https://api.github.com/repos/YourRepoHere'; | |
fetch(RepoLink) | |
.then((resp) => resp.json()) | |
.then((resp) => resp.assets.map((asset) => { | |
link = asset.browser_download_url; | |
window.location.href = link; | |
})) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment