Skip to content

Instantly share code, notes, and snippets.

@Andygmb
Last active May 24, 2019 16:19
Show Gist options
  • Save Andygmb/fc21b789ee7bdfce6f8818e207c45c1d to your computer and use it in GitHub Desktop.
Save Andygmb/fc21b789ee7bdfce6f8818e207c45c1d to your computer and use it in GitHub Desktop.
World Cup Endorsements
links = ["https://worldcup.playoverwatch.com/endorse/f0cec3a8627294b62a24b1f4","https://worldcup.playoverwatch.com/endorse/b6acaedf8f490fe71219136c","https://worldcup.playoverwatch.com/endorse/5bd6ed01fcbfbaa988d16772","https://worldcup.playoverwatch.com/endorse/3b97e3c23fce987ebbaeb514","https://worldcup.playoverwatch.com/endorse/221856b4c7782f2a1004854f","https://worldcup.playoverwatch.com/en-gb/endorse/87b705b927d710fe20411bd0","https://worldcup.playoverwatch.com/en-us/endorse/01c68dd6e23a3943e97be9c9","https://worldcup.playoverwatch.com/endorse/81a6639e4c4730aed66c1ec8","https://worldcup.playoverwatch.com/endorse/eba0109ee98e3a3b66201c2d","https://worldcup.playoverwatch.com/endorse/af341b0e997c63dbb85c3f11","https://worldcup.playoverwatch.com/endorse/0093a80d8f663c6f3cb13711","https://worldcup.playoverwatch.com/endorse/565fae555a6c8fd8fa8796cc","https://worldcup.playoverwatch.com/endorse/60d603fcf7fea73fa130771c","https://worldcup.playoverwatch.com/endorse/21eecf12c415e0053499fad5","https://worldcup.playoverwatch.com/endorse/38127316caa553da8d169991","https://worldcup.playoverwatch.com/endorse/a75f3261cbb7c28aaa3370c2","https://worldcup.playoverwatch.com/endorse/0f7d14bd6bc198d7c1bf6493","https://worldcup.playoverwatch.com/endorse/1dad220f5186b8863b13f279","https://worldcup.playoverwatch.com/endorse/409af046baf847445839b4c1","https://worldcup.playoverwatch.com/endorse/6205417b53313ed03191e111","https://worldcup.playoverwatch.com/endorse/16dd546c1322f7c0b03717e0","https://worldcup.playoverwatch.com/endorse/8f71f59cf0660f7d0947f288","https://worldcup.playoverwatch.com/endorse/67e9083e9779b9fcee9a29d2","https://worldcup.playoverwatch.com/endorse/6a1cf2702914602c0e48de99","https://worldcup.playoverwatch.com/endorse/a7e28c340575ff9383831b76","https://worldcup.playoverwatch.com/endorse/cdb50c2440c629b02ce105dc","https://worldcup.playoverwatch.com/endorse/8d718d5fcb6db0dd90db3e0f","https://worldcup.playoverwatch.com/endorse/797b323b0bb61321583053d0","https://worldcup.playoverwatch.com/endorse/8268aaee3b75398f3831c9fc","https://worldcup.playoverwatch.com/endorse/0e32df9b0578722754e4fb35","https://worldcup.playoverwatch.com/endorse/bdf2a364e0aeabd716d97179","https://worldcup.playoverwatch.com/endorse/c11a356ec562f9d54f479eba","https://worldcup.playoverwatch.com/endorse/1fc72c489e619d8e899ab2d1","https://worldcup.playoverwatch.com/endorse/48a67e2d8dc9570a4854a0eb","https://worldcup.playoverwatch.com/endorse/e5036e019d6974a997d3477c"]
function sleep(ms) {return new Promise(resolve => setTimeout(resolve, ms));}
async function vote() {
for (var i in links) {
var w = window.open(links[i]);
await sleep(1000);
try {
w.document.getElementById('terms').click();
await sleep(1000);
w.document.getElementsByClassName("Button Button--blue ApplyForm-button")[0].click();
} catch(err){};
await sleep(1000);
w.close()
}
}
var timeOf = links.length * 3;
var confirmed = confirm("This script will take " + timeOf + " seconds to run. Run?");
if (confirmed) { vote();};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment