Created
June 17, 2019 02:53
-
-
Save blissfulyoshi/67ee8c325d05b5ee47b6ba6a0843603c to your computer and use it in GitHub Desktop.
Some steam key getter (forgot for what)
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
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