list
This commit is contained in:
19
content.js
19
content.js
@@ -16,10 +16,9 @@ $(document).ready( function() {
|
||||
loadDataBase();
|
||||
//make heading
|
||||
$("table thead th:last-child").after('<th scope=col>Plus</th>');
|
||||
var modhtml = '<div class=modal id=myModal><div class=modal-content><span class=close>×</span><div class=card><div class=cardcontainer><h2 class=title>Computer Fluency (C S 302)</h2><h2 class=profname>with Bruce Porter</h2><div class=topbuttons><button class=matbut id="rateMyProf" style="background: #CDDC39;"> RMP </button><button class=matbut id="eCIS"> Past Syllabi </button><button class=matbut id="saveCourse" style="background: #F44336;"> Save Course +</button></div></div></div><div class=card><div class=cardcontainer><h2 class=description></h2></div></div><div class=card><div class=cardcontainer><div id=chart></div></div></div></div>'
|
||||
var modhtml = '<div class=modal id=myModal><div class=modal-content><span class=close>×</span><div class=card><div class=cardcontainer><h2 class=title>Computer Fluency (C S 302)</h2><h2 class=profname>with Bruce Porter</h2><div class=topbuttons><button class=matbut id="rateMyProf" style="background: #CDDC39;"> RMP </button><button class=matbut id="eCIS"> Past Syllabi </button><button class=matbut id="saveCourse" style="background: #F44336;"> Save Course +</button></div></div></div><div class=card><div class=cardcontainer><ul class=description style="list-style-type:disc"></ul></div></div><div class=card><div class=cardcontainer><div id=chart></div></div></div></div>'
|
||||
$("#container").prepend(modhtml);
|
||||
//console.log(grades);
|
||||
|
||||
$('table').find('tr').each(function(){
|
||||
if($(this).find('td').hasClass("course_header")){
|
||||
|
||||
@@ -46,12 +45,15 @@ $(document).ready( function() {
|
||||
|
||||
});
|
||||
$("#eCIS").click(function(){
|
||||
setTimeout(function(){
|
||||
window.open('https://utdirect.utexas.edu/apps/student/coursedocs/nlogon/?semester=&department='+department+'&course_number='+course_nbr+'&course_title=&unique=&instructor_first=&instructor_last='+profname+'&course_type=In+Residence&search=Search');
|
||||
}, 200);
|
||||
});
|
||||
$("#rateMyProf").click(function(){
|
||||
setTimeout(function(){
|
||||
window.open(rmpLink);
|
||||
}, 200);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function getCourseInfo(row){
|
||||
@@ -290,17 +292,20 @@ function getDescription(){
|
||||
object.find('#details > p').each(function(){
|
||||
var sentence = $(this).text();
|
||||
if(sentence.indexOf("Prerequisite") == 0){
|
||||
sentence = "<span style='font-weight: bold;'>"+sentence+"</span>";
|
||||
sentence = "<li style='font-weight: bold; padding-left: 5px;'>"+sentence+"</li>";
|
||||
}
|
||||
else if(sentence.indexOf("May be") >=0 ){
|
||||
console.log(sentence.indexOf("May be"));
|
||||
sentence = "<span style='font-style: italic;'>"+sentence+"</span>";
|
||||
sentence = "<li style='font-style: italic; padding-left: 5px;'>"+sentence+"</li>";
|
||||
}
|
||||
else if(sentence.indexOf("Restricted to") == 0){
|
||||
//console.log(sentence);
|
||||
sentence = "<span style='color:red;'>"+sentence+"</span>";
|
||||
sentence = "<li style='color:red; padding-left: 5px;'>"+sentence+"</li>";
|
||||
}
|
||||
output+=sentence+"<br></>";
|
||||
else{
|
||||
sentence= "<li style='padding: 5px;'>"+sentence+"</li>";
|
||||
}
|
||||
output+=sentence;
|
||||
|
||||
});
|
||||
description = output;
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<button id="changeColor"></button>
|
||||
<script src="popup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,7 +16,6 @@
|
||||
background-color: #fefefe;
|
||||
margin: auto;
|
||||
max-height: 85%;
|
||||
min-width: 55%;
|
||||
overflow-y: auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
@@ -86,6 +85,9 @@
|
||||
transition:width 300ms ease-in-out, height 300ms ease-in-out;
|
||||
}
|
||||
|
||||
.description {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
@@ -101,6 +103,7 @@
|
||||
/* Material style */
|
||||
.matbut {
|
||||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
margin: 10px 10px 10px 0px;
|
||||
|
||||
Reference in New Issue
Block a user