Last active
August 29, 2015 14:07
-
-
Save fabiomadge/abccb162cca9b83d5182 to your computer and use it in GitHub Desktop.
Auto Booker
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
javascript:function initiate(){var line=prompt("Please enter the line of your desired group","1");autoSignUp(line);}function autoSignUp(group){if(document.getElementById("InfoDIV")!=null){if(document.getElementById("InfoDIV").style.visibility!="hidden")closeMyAlert();}var groupString=group.toString();var buttonName="btn0000".slice(0,(7-groupString.length))+groupString;if(document.getElementsByName(buttonName).length>0){document.getElementsByName(buttonName)[0].onclick();}else{console.log("Sorry, too late!");return;}if(document.getElementById("InfoDIV")!=null){if(document.getElementById("InfoDIV").style.visibility!="hidden")closeMyAlert();}var d=new Date();console.log(d.getHours()+":"+d.getMinutes()+":"+d.getSeconds()+":"+d.getMilliseconds());if(document.getElementsByTagName('body')[0].innerHTML.indexOf("noch nicht angemeldet")>0){setTimeout(function(){autoSignUp(group);},150);}}initiate(); |
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
javascript:function initiate(){ | |
var line = prompt("Please enter the line of your desired group", "1"); | |
autoSignUp(line); | |
} | |
function autoSignUp(group){ | |
if(document.getElementById("InfoDIV") != null){ | |
if(document.getElementById("InfoDIV").style.visibility != "hidden") closeMyAlert(); | |
} | |
var groupString = group.toString(); | |
var buttonName = "btn0000".slice(0,(7 - groupString.length)) + groupString; | |
if(document.getElementsByName(buttonName).length > 0){ | |
document.getElementsByName(buttonName)[0].onclick(); | |
} | |
else{ | |
console.log("Sorry, too late!"); | |
return; | |
} | |
if(document.getElementById("InfoDIV") != null){ | |
if(document.getElementById("InfoDIV").style.visibility != "hidden") closeMyAlert(); | |
} | |
var d = new Date(); | |
console.log(d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() + ":" + d.getMilliseconds()); | |
if(document.getElementsByTagName('body')[0].innerHTML.indexOf("noch nicht angemeldet") > 0){ | |
setTimeout(function() {autoSignUp(group);},150); | |
} | |
}initiate(); |
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
function autoSignUp(group){ | |
if(document.getElementById("InfoDIV") != null){ | |
if(document.getElementById("InfoDIV").style.visibility != "hidden") closeMyAlert(); | |
} | |
//assamble name of signup button | |
var groupString = group.toString(); | |
var buttonName = "btn0000".slice(0,(7 - groupString.length)) + groupString; | |
//click anmelden | |
if(document.getElementsByName(buttonName).length > 0){ | |
document.getElementsByName(buttonName)[0].onclick(); | |
} | |
else { | |
console.log("Sorry, too late!"); | |
return; | |
} | |
if(document.getElementById("InfoDIV") != null){ | |
if(document.getElementById("InfoDIV").style.visibility != "hidden") closeMyAlert(); | |
} | |
//log time | |
var d = new Date(); | |
console.log(d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() + ":" + d.getMilliseconds()); | |
//set next try for in 150ms | |
if(document.getElementsByTagName('body')[0].innerHTML.indexOf("noch nicht angemeldet") > 0){ | |
setTimeout(function() {autoSignUp(group);},150); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment