Skip to content

Instantly share code, notes, and snippets.

@stadja
Last active April 29, 2026 05:29
Show Gist options
  • Select an option

  • Save stadja/b8e5c43da35381f9bbfe6d8c6c2b7334 to your computer and use it in GitHub Desktop.

Select an option

Save stadja/b8e5c43da35381f9bbfe6d8c6c2b7334 to your computer and use it in GitHub Desktop.
Auto claim your script
// is there a game to claim ? if yes, claim it
if ($('[value="claim"]') && $('[value="claim"]')[0]) {
$('[value="claim"]')[0].click();
// have I claimed a game ? If yes, go back
} else if (!window.location.toString().includes("/bundle/download")) {
window.history.back();
// no game to claim, no game claimed, change page
} else {
$('.next_page')[0].click()
}
@Rainbow-Spike

Copy link
Copy Markdown

@Rainbow-Spike

Copy link
Copy Markdown

ScriptAutoRunner is stillborn sh*tcode which is not known and not interesting to anyone

@Rainbow-Spike

Copy link
Copy Markdown

The Greasemonkey and Tampermonkey addons have real power, but the latter is more cross-platform, so I recommend TM

@stadja

stadja commented Apr 2, 2021

Copy link
Copy Markdown
Author

ScriptAutoRunner is stillborn sh*tcode which is not known and not interesting to anyone

Well yep. But as my code is 100% full javascript, who gives a f*ck ?

@paucc

paucc commented Mar 8, 2022

Copy link
Copy Markdown

I've modified the script for the bindle "Bundle for Ukraine" to avoid the other going back out of the list page:

// is there a game to claim ? if yes, claim it
 if ($('[value="claim"]') && $('[value="claim"]')[0]) {
    $('[value="claim"]')[0].click();
     
// have I claimed a game ? If yes, go back
} else if (!window.location.toString().includes("/bundle/download")) { 
    $('.nav_btn')[1].click(); 
    
// no game to claim, no game claimed, change page
} else {
    $('.next_page')[0].click()
}

@nogerman

Copy link
Copy Markdown

Is there a way to download (backup ;-) all the games? not just the Windows Version, all the Versions to build a local libary.
I am bad at scripting, I did not even understand where and how the value is checked for claim

@bryce13950

Copy link
Copy Markdown

Use history back to prevent going all the way back to the first page of the bundle when running this.

// is there a game to claim ? if yes, claim it
 if ($('[value="claim"]') && $('[value="claim"]')[0]) {
    $('[value="claim"]')[0].click();
     
// have I claimed a game ? If yes, go back
} else if (!window.location.toString().includes("/bundle/download")) { 
    window.history.back() 
    
// no game to claim, no game claimed, change page
} else {
    $('.next_page')[0].click()
}

@dehqonovmurodbek7-netizen

Copy link
Copy Markdown

Tronpick

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