Skip to content

Instantly share code, notes, and snippets.

@lats
Last active May 7, 2024 17:13
Show Gist options
  • Star 39 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save lats/c920866caf9c0cb04e82abba411e1bb9 to your computer and use it in GitHub Desktop.
Save lats/c920866caf9c0cb04e82abba411e1bb9 to your computer and use it in GitHub Desktop.
Tampermonkey script to claim all of the items within a Bundle on Itch.io
// ==UserScript==
// @name Activate all Itch.io Bundle downloads
// @version 1
// @include https://itch.io/bundle/download/*
// @include https://*.itch.io/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @grant none
// ==/UserScript==
$(document).ready(function() {
setTimeout(function() {
if (window.location.href.indexOf('https://itch.io/bundle/download/') == 0) {
// Bundle page
var claimButtons = $('button[value="claim"]');
if (claimButtons.length > 0) {
// Claim the first unclaimed game on the page
claimButtons.first().click();
}
else {
// Advance to the next page if all are already claimed
var nextPageButtons = $('a.next_page.button');
if (nextPageButtons.length > 0) nextPageButtons[0].click();
}
}
else if (!window.location.href.indexOf('https://itch.io/bundle/download/') == 0) {
// Download page, return to bundle
window.history.back();
}
}
// Amount of time, in MS, to wait between 'clicks'
,2000);
});
@Wilker-uwu
Copy link

it also works in other bundles within the Itch.io website :3

@ryanpcmcquen
Copy link

Just worked for me on a bundle I bought in 2023, nice work!

@FrozenGamerAK
Copy link

Thanks.. It worked today May.10.23 on turkey and Syria earthquake relief mega bundle.. Took me quite a while to find the script with google.

@Melidebby
Copy link

Is there a way to edit this code so that it grabs all the free to claim games on itch.io/games/on-sale?

@lats
Copy link
Author

lats commented Nov 17, 2023

Is there a way to edit this code so that it grabs all the free to claim games on itch.io/games/on-sale?

That would require an at least one entirely new script. It would need to parse the information for any game that has a price of $0 and open that game's page.
There's possibly an API way to do it but that's not something I'm familiar with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment