Forked from chamakits/humble-bundle-direct-download-staggered.js
Created
November 7, 2017 14:19
-
-
Save dschep/080dc9a018d03765d7cf82c3f599e9a2 to your computer and use it in GitHub Desktop.
Download Humble Bundle Books
This file contains hidden or 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
javascript: function runDownloadThing(howManyToDownload) { | |
if (!howManyToDownload) { | |
howManyToDownload = 3; | |
} | |
if (window['downloadSome']) { | |
window.downloadSome(); | |
return; | |
} | |
var iter = $('div.download a.a:not([download])').toArray(); | |
iter = iter.concat($('div.row a[download]').toArray()); | |
window['downloadSome'] = (function() { | |
console.log("Downloads left: ", iter.length); | |
var someToDownload = iter.slice(0, howManyToDownload); | |
someToDownload.forEach(function(curr) { | |
curr.click(); | |
}); | |
iter = iter.slice(howManyToDownload); | |
}); | |
window.downloadSome(); | |
} | |
runDownloadThing(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install: http://dschep.github.io/GistMarklets/#080dc9a018d03765d7cf82c3f599e9a2