forked from SarthakPatidar/Autofill-SRM-Academia-FeedBack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
22 lines (22 loc) · 1.22 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
javascript: (function () {
function F1() {
var rows = document.querySelectorAll("table.zc-subformcontent tr.zc-grid-subform");
for(var i = 1; i <= rows.length; i++) {
var tr = rows[i];
if(tr)
{
for(var j = 2; j <= tr.cells.length; j++) {
if(typeof(tr.querySelectorAll('td li.search-selected-val')[j]) != 'undefined' && tr.querySelectorAll('td li.search-selected-val')[j] != null)
{
tr.querySelectorAll('td li.search-selected-val')[j].setAttribute("selvalue","2727643000027208389"); // Change Grade Code Here // [Refer to README.md for list of Grade Codes]
tr.querySelectorAll('td li.search-selected-val')[j].querySelector("span").innerHTML = "Excellent"; // Replace Grade Name Here //
tr.querySelectorAll('td li.search-selected-val')[j].querySelector("input").setAttribute("value","2727643000027208389");
}
}
var comment = tr.querySelector('td textarea.zc-gridsubform-input');
if(comment){ comment.innerHTML = "Good Teacher" }; // Edit Comment Here
}
}
}
F1();
})();