Skip to content

Instantly share code, notes, and snippets.

@cold-logic
Created October 24, 2017 01:16
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Export a list of Humble Bundle eBooks
{
let a = [], b // Setup local vars
console.clear() // Clear the console
// For each item
$(".gameinfo").each(function() {
// Get the title & subtitle
let title = $(this).find('.title').text().trim()
let subtitle = $(this).find('.subtitle').text().trim()
a.push(`${title} - ${subtitle} #Humble`)
// Add the download URLs
$(this).siblings('.downloads').find('.js-start-download').find('a').each(function() {
a.push(`\t${this.href}`)
})
})
b = a.join("\n") // Add new lines
copy(b) // Copy to clipboard
console.log(b) // Log to console
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment