Skip to content

Instantly share code, notes, and snippets.

@blissfulyoshi
Last active September 4, 2017 17:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blissfulyoshi/536ecf296ef6e6144f054f68d2562d60 to your computer and use it in GitHub Desktop.
Save blissfulyoshi/536ecf296ef6e6144f054f68d2562d60 to your computer and use it in GitHub Desktop.
Indiegala keyloading script
confirm = function() {
return true;
};
var salePanel = document.querySelector('[aria-expanded="true"] [aria-expanded="true"] div[aria-expanded="true"]');
var blah = salePanel.querySelectorAll('a.create-permalink-btn')
var i = 0, howManyTimes = blah.length;
function f() {
blah[i].click();
i++;
if( i < howManyTimes ){
setTimeout( f, 2000 );
}
else {
let games = salePanel.querySelectorAll('.game-key-string');
let gameAndKeyList = '';
let keylist = '';
for (let i = 0; i < games.length; i++) {
gameAndKeyList = gameAndKeyList + games[i].querySelector('.game-steam-url').innerText + '\t' + games[i].querySelector('input.keys').value + '\n';
keylist = keylist + games[i].querySelector('input.keys').value + '\n';
}
console.log(gameAndKeyList);
console.log(keylist);
}
}
f();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment