Skip to content

Instantly share code, notes, and snippets.

@blissfulyoshi
Created June 17, 2019 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blissfulyoshi/67ee8c325d05b5ee47b6ba6a0843603c to your computer and use it in GitHub Desktop.
Save blissfulyoshi/67ee8c325d05b5ee47b6ba6a0843603c to your computer and use it in GitHub Desktop.
Some steam key getter (forgot for what)
confirm = function() {
return true;
};
var salePanel = document.querySelector('.panel-collapse.collapse.in[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