Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

I did a quick grabber to claim them all using JS, but you need to run it from the console on each page of the bundle. I tried to make it get them all but it's throwing too many errors and I cba to fix it, this is quicker than doing it for them all individually anyway! Note that it will throw errors because of CORs but the games will appear in your library, once it stops throwing errors move to the next page!

baseURL = window.location.protocol + "//" + window.location.host + location.pathname

var games = document.getElementsByClassName("form");

for(var x = 0; x < games.length; x++)
{
var csrf_token = games[x].getElementsByTagName("input")[0].value;
    var game_id = games[x].getElementsByTagName("input")[1].value;
var xhr = new XMLHttpRequest();
xhr.open("POST", baseURL, true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send("csrf_token=" + csrf_token + "&game_id=" + game_id + "&action=claim");
}


(2 edits) (+2)

I have a slight modification since the search bar that was added messes up the var games = document.getElementsByClassName("form"); array.

it uses jQuery to find and iterate since it's available.

I made some tweaks so that it will log the name of the game just added and will do all of them in order so it's easy to tell when it's done. NOTE: this does make it so you can't click anything on the page while it runs.


baseURL = window.location.protocol + "//" + window.location.host + location.pathname
$('.game_list').find('form[method=POST]').each(function(index,form){
    var csrf_token = $(form).find('input[name=csrf_token]').val()
    var game_id = $(form).find('input[name=game_id]').val()
    try{
        var xhr = new XMLHttpRequest();
        xhr.open("POST", baseURL, false);
        xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        xhr.send("csrf_token=" + csrf_token + "&game_id=" + game_id + "&action=claim");
    } catch(error){
        //console.log(error);
    }
    var game_title = $(form).parents('.game_row_data').find('.game_title').text()
    console.log("added number",index+1, game_title)
})


Does anyone happen to know if newly added games are always added to the last page? If they aren't it might be tricky to find and add those among the ones you've already claimed.

God bless you. Thank you!!!!!.

I double checked the last download page and there was this note at the top:

"Note: We will be updating this page soon, we know it's difficult to navigate so many games. We know you want a button to add show everything in your library. No need to reach out. Any new games added to the bundle will automatically show up here. Thanks!"

so you might not need to bother with the scripts soon.

Hi,
when I run your script in the console, every addition is printed, but it does not appear in my collection.
Any thoughts?

I always forget about cross-browser compatibility.  I just tried it in Edge and Firefox and it unfortunately didn't work. I don't really have the time to debug it, I'm sorry.

It should run if you use Google Chrome though.

Thank you for this!