-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcontent.js
177 lines (126 loc) · 7.75 KB
/
content.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
console.log("ماشاء الله هكر");
let tabLink = window.location.toString();
chrome.storage.sync.get('mode', function (items) {
// console.log(items.mode)
if (items.mode === 'turbo') {
// console.log(tabLink);
if (tabLink == "https://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/activitiesInstructorsIndex.faces" ||
tabLink == "http://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/activitiesInstructorsIndex.faces") {
// console.log('صفحة التقييم');
var r = document.getElementsByTagName('input');
var i = 0;
var vir = 11;
for (i; i < 31; i++) {
r[vir].checked = true;
vir = vir + 5;
}
r[25].checked = true;
r[144].checked = true;
// clearFormHiddenParams_frm
var curForm = document.forms['frm'];
curForm.elements['frm:_idcl'].value = null;
document.forms['frm']['frm:_idcl'].value = 'frm:saveEval';
document.forms['frm'].submit();
submitForm('/ksu');
}
if (tabLink == "https://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/evaluationTypesIndex.faces" ||
tabLink == "http://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/evaluationTypesIndex.faces") {
// console.log('صفحة اختيار المقرر');
var frmAction = document.getElementById('frm').action;
// console.log(frmAction);
if (frmAction == "https://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/activitiesInstructorsIndex.faces" ||
frmAction == "http://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/activitiesInstructorsIndex.faces") {
document.getElementById("frm:index").value = 0;
// clearFormHiddenParams_frm
var curForm = document.forms['frm'];
curForm.elements['frm:_idcl'].value = null;
document.forms['frm']['frm:_idcl'].value = 'frm:_id41:0:_id44';
document.forms['frm'].submit();
}
clearFormHiddenParams_frm('frm');
}
if (tabLink == "https://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/evalQuestionsIndex.faces" ||
tabLink == "http://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/evalQuestionsIndex.faces") {
// console.log('logged');
var frmAction = document.getElementById('frm').action;
// console.log(frmAction);
if (frmAction == "https://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/activitiesInstructorsIndex.faces" ||
frmAction == "http://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/activitiesInstructorsIndex.faces") {
// clearFormHiddenParams_frm
var curForm = document.forms['frm'];
curForm.elements['frm:_idcl'].value = null;
document.forms['frm']['frm:_idcl'].value = 'frm:_id41:0:_id44';
document.forms['frm'].submit();
} else {
// console.log('صفحة الرجوع بعد التقييم');
// clearFormHiddenParams_frm
var curForm = document.forms['frm'];
curForm.elements['frm:_idcl'].value = null;
document.forms['frm']['frm:_idcl'].value = 'frm:cmdLink';
document.forms['frm'].submit();
}
}
} else {
turbo = false;
if (tabLink == "https://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/activitiesInstructorsIndex.faces" ||
tabLink == "http://edugate.ksu.edu.sa/ksu/ui/student/student_evaluation/index/activitiesInstructorsIndex.faces") {
// console.log('صفحة التقييم والوضع نورمااال');
var tables = document.getElementById('frm').querySelector("table:nth-child(3)").insertAdjacentHTML('beforebegin', '<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td class="fontTextMain">تــــقــــيــــيــــم</td></tr><tr> <td height="5"></td></tr><tr> <td> <table width="100%" border="0" cellpadding="1" cellspacing="1"> <tbody> <tr style=" border-color: red;"> <td width="3" class="HEADING" style=" background: #0c4463;"> </td><th class="HEADING" style=" background: #0c4463;"> <div align="right"> الخيارات </div></th> <th class="HEADING" style=" background: #0c4463;"> لا أوافق مطلقاً </th> <th class="HEADING" style=" background: #0c4463;"> لا أوافق </th> <th class="HEADING" style=" background: #0c4463;"> أوافق إلى حد ما </th> <th class="HEADING" style=" background: #0c4463;"> أوافق </th> <th class="HEADING" style=" background: #0c4463;"> أوافق بشدة </th> </tr><tr> <td width="3" class="ROW1"> </td><td align="right" class="ROW1"> <div align="right"> 1 - اختر واحد من الخيارات لاختياره للبقية </div></td><td align="center" class="ROW1"> <input class="tq" type="radio" name="tq" id="tq1" value="1"> </td><td align="center" class="ROW1"> <input class="tq" type="radio" name="tq" id="tq2" value="2"> </td><td align="center" class="ROW1"> <input class="tq" type="radio" name="tq" id="tq3" value="3"> </td><td align="center" class="ROW1"> <input class="tq" type="radio" name="tq" id="tq4" value="4"> </td><td align="center" class="ROW1"> <input class="tq" type="radio" name="tq" id="tq5" value="5"> </td></tr></tbody> </table> </td></tr></tbody></table>');
document.getElementById('tq1').addEventListener('click', function () {
var r = document.getElementsByTagName('input');
var i = 0;
var vir = 1 + 7;
for (i; i < 32; i++) {
r[vir].checked = true;
vir = vir + 5;
}
r[30].checked = true;
r[149].checked = true;
})
document.getElementById('tq2').addEventListener('click', function () {
var r = document.getElementsByTagName('input');
var i = 0;
var vir = 2 + 7;
for (i; i < 32; i++) {
r[vir].checked = true;
vir = vir + 5;
}
r[30].checked = true;
r[149].checked = true;
})
document.getElementById('tq3').addEventListener('click', function () {
var r = document.getElementsByTagName('input');
var i = 0;
var vir = 3 + 7;
for (i; i < 32; i++) {
r[vir].checked = true;
vir = vir + 5;
}
r[30].checked = true;
r[149].checked = true;
})
document.getElementById('tq4').addEventListener('click', function () {
var r = document.getElementsByTagName('input');
var i = 0;
var vir = 4 + 7;
for (i; i < 32; i++) {
r[vir].checked = true;
vir = vir + 5;
}
r[30].checked = true;
r[149].checked = true;
})
document.getElementById('tq5').addEventListener('click', function () {
var r = document.getElementsByTagName('input');
var i = 0;
var vir = 5 + 7;
for (i; i < 32; i++) {
r[vir].checked = true;
vir = vir + 5;
}
r[30].checked = true;
r[149].checked = true;
})
}
}
});