-
-
Save jjjakey/afd6da0d64d90051d7469f7729f5ef7f to your computer and use it in GitHub Desktop.
Claims all of the items within the "Bundle for Racial Justice and Equality" on Itch.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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('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 { | |
// Download page, return to bundle | |
window.history.back(); | |
} | |
} | |
,3000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I dunno if indexOf has different behavior on chrome or if something was updated. This is my hacksaw fix to get the script working again for the new Ukraine bundle. I think itch.io promised a solution to this problem back 2 years ago during the BLM bundle and never delivered afaik; so I don't feel bad anymore just keep the delay ethical if you use this please.