Skip to content

Instantly share code, notes, and snippets.

@1271
Created November 2, 2017 15:27
Show Gist options
  • Save 1271/da359c912ec3484daf05ced9383c4d04 to your computer and use it in GitHub Desktop.
Save 1271/da359c912ec3484daf05ced9383c4d04 to your computer and use it in GitHub Desktop.
<script>
function downloadPack() {
fetch("https://api.github.com/repos/yuru-yuri/Manga-Downloader/releases/latest")
.then(response => response.json())
.then((out) => {
// Initiate the download.
document.querySelector("#without-html5-").innerHTML="<a href='"+out.zipball_url+"'>Click here if the download didn't start automatically.</a>";
window.location.assign(out.zipball_url);
});
}
if (window.location.hash === "#directDownload") downloadPack();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment