-
-
Save lats/c920866caf9c0cb04e82abba411e1bb9 to your computer and use it in GitHub Desktop.
// ==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); | |
}); |
Just worked for me on a bundle I bought in 2023, nice work!
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.
Is there a way to edit this code so that it grabs all the free to claim games on itch.io/games/on-sale?
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.
Is there a way to edit this code so that it grabs all the free to claim games on itch.io/games/on-sale?
Idk if its exactly how you want it (for only sale items), but something like that does already exist. https://github.com/Smart123s/ItchClaim
it also works in other bundles within the Itch.io website :3