ratings column

This commit is contained in:
10001shh
2018-06-30 18:48:37 -05:00
parent 7ba7f6c1a2
commit ffbcbbc04f
2 changed files with 23 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
var elements = document.getElementsByClassName('rwd-table results');
var table = elements[0];
var header = table.tHead.children[0];
var th = document.createElement('th');
th.innerHTML = "Rating";
header.insertBefore(th,header.children[5]);
var tableBody = table.getElementsByTagName('tbody')[0];
tr = tableBody.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
if(!(tr[i].children.length == 1)){
var td = document.createElement('td');
var newContent = document.createTextNode(Math.random());
td.appendChild(newContent);
tr[i].insertBefore(td,tr[i].children[5]);
}
}

View File

@@ -9,6 +9,9 @@
"css": ["styles.css"],
"js": ["content.js"],
"matches": ["https://utdirect.utexas.edu/apps/registrar/course_schedule/*"]
}]
}],
"background": {
"scripts": ["content.js"],
"persistent": false
}
}