Last active
September 4, 2017 17:32
-
-
Save blissfulyoshi/536ecf296ef6e6144f054f68d2562d60 to your computer and use it in GitHub Desktop.
Indiegala keyloading script
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('[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