Skip to content

Instantly share code, notes, and snippets.

@Ult1mat3S
Last active July 19, 2023 02:44
Show Gist options
  • Select an option

  • Save Ult1mat3S/34e9486d7147fa50dfb7f66fa33827d8 to your computer and use it in GitHub Desktop.

Select an option

Save Ult1mat3S/34e9486d7147fa50dfb7f66fa33827d8 to your computer and use it in GitHub Desktop.
// https://pastebin.com/raw/BFGFyYpc
var removeLinks = jQuery('.account_table a');
var total = removeLinks.length;
var loaded = 0;
var modal = ShowBlockingWaitDialog( 'Executing…',
'Please wait until all requests finish. Ignore all the errors, let it finish.');
removeLinks.each(function(i, el) {
var match = el.href.match( /javascript:RemoveFreeLicense\( ([0-9]+), '/ );
if(match !== null) {
var packageid= +match[1];
jQuery.post(
'https://store.steampowered.com/account/removelicense',
{
sessionid: g_sessionID,
packageid: packageid
}
).always(function() {
loaded++;
modal.Dismiss();
if(loaded >= total) {
location.reload();
} else {
modal = ShowBlockingWaitDialog( 'Executing…',
'Loaded <b>' + loaded + '</b>/' + total + '.' );
}
});
} else {
loaded++;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment