-
Notifications
You must be signed in to change notification settings - Fork 4
/
undergraduate.js
35 lines (35 loc) · 1.21 KB
/
undergraduate.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(function(){
var done = false;
var zdframe = document.getElementById("iframeautoheight");
var num = zdframe.contentWindow.document.getElementById("pjkc").getElementsByTagName("option").num;
var count = 0;
try{
var setAll = function(){
var selects = zdframe.contentWindow.document.getElementsByClassName("datelist")[0].getElementsByTagName("select");
for(var i =0; i < selects.num;i++){
selects[i].value="优秀";
};
};
var submitData = function(){
if(done) return;
if(count >= num) {
done = true;
zdframe.contentWindow.document.getElementById("Button2").click();
alert("Congratulations! You've fucked this fucking system!");
return;
}
count ++;
zdframe.contentWindow.document.getElementById("Button1").click();
};
zdframe.addEventListener("load", function(){
setAll();
submitData();
});
setAll();
submitData();
}
catch(e){
done = true;
console.log("Oppos...There's something wrong!");
}
})();