list
This commit is contained in:
19
content.js
19
content.js
@@ -16,10 +16,9 @@ $(document).ready( function() {
|
|||||||
loadDataBase();
|
loadDataBase();
|
||||||
//make heading
|
//make heading
|
||||||
$("table thead th:last-child").after('<th scope=col>Plus</th>');
|
$("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);
|
$("#container").prepend(modhtml);
|
||||||
//console.log(grades);
|
//console.log(grades);
|
||||||
|
|
||||||
$('table').find('tr').each(function(){
|
$('table').find('tr').each(function(){
|
||||||
if($(this).find('td').hasClass("course_header")){
|
if($(this).find('td').hasClass("course_header")){
|
||||||
|
|
||||||
@@ -46,12 +45,15 @@ $(document).ready( function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
$("#eCIS").click(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');
|
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(){
|
$("#rateMyProf").click(function(){
|
||||||
|
setTimeout(function(){
|
||||||
window.open(rmpLink);
|
window.open(rmpLink);
|
||||||
|
}, 200);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function getCourseInfo(row){
|
function getCourseInfo(row){
|
||||||
@@ -290,17 +292,20 @@ function getDescription(){
|
|||||||
object.find('#details > p').each(function(){
|
object.find('#details > p').each(function(){
|
||||||
var sentence = $(this).text();
|
var sentence = $(this).text();
|
||||||
if(sentence.indexOf("Prerequisite") == 0){
|
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 ){
|
else if(sentence.indexOf("May be") >=0 ){
|
||||||
console.log(sentence.indexOf("May be"));
|
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){
|
else if(sentence.indexOf("Restricted to") == 0){
|
||||||
//console.log(sentence);
|
//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;
|
description = output;
|
||||||
|
|||||||
@@ -11,5 +11,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<button id="changeColor"></button>
|
<button id="changeColor"></button>
|
||||||
|
<script src="popup.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
background-color: #fefefe;
|
background-color: #fefefe;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
max-height: 85%;
|
max-height: 85%;
|
||||||
min-width: 55%;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border: 1px solid #888;
|
border: 1px solid #888;
|
||||||
@@ -86,6 +85,9 @@
|
|||||||
transition:width 300ms ease-in-out, height 300ms ease-in-out;
|
transition:width 300ms ease-in-out, height 300ms ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.close:hover,
|
.close:hover,
|
||||||
.close:focus {
|
.close:focus {
|
||||||
@@ -101,6 +103,7 @@
|
|||||||
/* Material style */
|
/* Material style */
|
||||||
.matbut {
|
.matbut {
|
||||||
border: none;
|
border: none;
|
||||||
|
outline: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: white;
|
color: white;
|
||||||
margin: 10px 10px 10px 0px;
|
margin: 10px 10px 10px 0px;
|
||||||
|
|||||||
1
todo
1
todo
@@ -9,6 +9,7 @@ TODO:
|
|||||||
- waitlist/closed/open colors
|
- waitlist/closed/open colors
|
||||||
- maybe modal animations?
|
- maybe modal animations?
|
||||||
- fix close button
|
- fix close button
|
||||||
|
- Degree plan?
|
||||||
- underline Courses maybe? click to go to using the planner link thing
|
- underline Courses maybe? click to go to using the planner link thing
|
||||||
- Rate my prof link scraping?
|
- Rate my prof link scraping?
|
||||||
- when almost everything is blank: M 379H as example
|
- when almost everything is blank: M 379H as example
|
||||||
|
|||||||
Reference in New Issue
Block a user