Skip to content

Instantly share code, notes, and snippets.

@tedkulp
Last active April 14, 2023 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tedkulp/ce965e687990dd795d51ba005cb87959 to your computer and use it in GitHub Desktop.
Save tedkulp/ce965e687990dd795d51ba005cb87959 to your computer and use it in GitHub Desktop.
Get unredeemed keys in Humble Bundle
// Taken and modified from: https://reddit.com/r/humblebundles/comments/inm60w/meta_how_to_easily_pull_a_list_of_all_your/
// Run in dev console at: https://www.humblebundle.com/home/keys
// Target platform: Steam, GOG or OUYA
var targetPlatform = 'GOG';
//if you're not on the first page navigate to the first page
if($('.js-jump-to-page:first').text() != "1"){
$('.js-jump-to-page:nth-child(2)').click();
}
// Find how many pages of games you have by getting the text inside the last page button
var loop = $('.js-jump-to-page:nth-last-child(2)').html()*1
// array to store all games found
var x = [];
// loop through each page
for(i=0;i<loop;i++){
// for each game on the page add an entry into the array
$('tbody tr').each(function(){
var name = $(this).children('td.game-name').children('h4').attr('title');
var platform = $(this).children('td.platform').children('i').attr('title');
//if (platform == targetPlatform) {
x.push(name + " (" + platform + ")");
//}
})
// click next page button
$('.js-jump-to-page:last').click()
}
// sort game list
x.sort();
// Output list of games.
console.log(' - - - - - - - - OUTPUT - - - - - - - ')
console.log(x.join("\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment