Last active
June 13, 2018 22:02
-
-
Save camillevilla/f812118fc0ef1f4df8728395702f16bc to your computer and use it in GitHub Desktop.
Bulk download humble bundle files
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
// Here ya go, dad! 2018-06-10 | |
// Open Firefox | |
// Options / Preferences --> Tabs --> Open links in tabs instead of new windows | |
// Options / Preferences --> Applications --> PDF, Action: Save file | |
// Allow pop-ups from humblebundle.com | |
// With your Humble Bundle purchases tab open in Firefox: | |
// Firefox --> Web Tools --> Web Console | |
// Click the "Raw" button on this GitHub page and paste in the stuff below | |
// If you want to grab other files, replace "PDF" with "EPUB" or "MOBI" | |
var spans =Array.from(document.getElementsByClassName('label')) | |
spans = spans.filter(span => span.textContent == "PDF") | |
var links = spans.map((span) => span.nextElementSibling) | |
function openInNewTab(url) { | |
var win = window.open(url, '_blank'); | |
} | |
links.forEach((link) => openInNewTab(link)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment