Skip to content

Instantly share code, notes, and snippets.

@metaphore
Last active October 16, 2021 17:43
Show Gist options
  • Save metaphore/291af68f0d8281c7333c6eb1d5b783b0 to your computer and use it in GitHub Desktop.
Save metaphore/291af68f0d8281c7333c6eb1d5b783b0 to your computer and use it in GitHub Desktop.
Chrome bookmarklet to display latest release download count for https://github.com/crashinvaders/gdx-texture-packer-gui project.
data:text/html,<script>
fetch('https://api.github.com/repos/crashinvaders/gdx-texture-packer-gui/releases').then(response => {
response.text().then(responseText => {
let parsedResponse = JSON.parse(responseText);
let content = parsedResponse[0].assets.map(asset => ({
file: asset.name,
downloads: asset.download_count
}));
let htmlContent = JSON.stringify(content, null, 4);
alert(htmlContent);
})
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment