Skip to content

Instantly share code, notes, and snippets.

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