can change the semester
This commit is contained in:
@@ -152,13 +152,10 @@ body {
|
|||||||
animation: ripple 1s ease-out;
|
animation: ripple 1s ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=number]{
|
input{
|
||||||
width: 80px;
|
width: 80px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
::placeholder{
|
|
||||||
|
|
||||||
};
|
|
||||||
input[type=number]::-webkit-inner-spin-button,
|
input[type=number]::-webkit-inner-spin-button,
|
||||||
input[type=number]::-webkit-outer-spin-button {
|
input[type=number]::-webkit-outer-spin-button {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
|
|||||||
40
js/popup.js
40
js/popup.js
@@ -5,6 +5,7 @@ setCourseList();
|
|||||||
|
|
||||||
// var modhtml = '<div class=modal id=myModal><div class=modal-content><span class=close>×</span><div class=card><div class=cardcontainer></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></div></div></div></div>';
|
||||||
// $("#html").prepend(modhtml);
|
// $("#html").prepend(modhtml);
|
||||||
|
getSemesters();
|
||||||
|
|
||||||
|
|
||||||
function setCourseList(){
|
function setCourseList(){
|
||||||
@@ -172,12 +173,14 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#search").click(function(){
|
$("#search").click(function(){
|
||||||
if($("#search>i").text() == 'close'){
|
if($("#search>i").text() == 'close') {
|
||||||
$("#search>i").text('search');
|
$("#search>i").text('search');
|
||||||
$("#class_id").hide();
|
$("#class_id").hide();
|
||||||
|
$("#semesters").hide();
|
||||||
} else{
|
} else{
|
||||||
$("#search>i").text('close');
|
$("#search>i").text('close');
|
||||||
$("#class_id").show();
|
$("#class_id").show();
|
||||||
|
$("#semesters").show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#import').click(function () {
|
$('#import').click(function () {
|
||||||
@@ -198,7 +201,7 @@ $(document).ready(function () {
|
|||||||
var unique = $(this).val();
|
var unique = $(this).val();
|
||||||
if(!isNaN(unique)){
|
if(!isNaN(unique)){
|
||||||
if(unique.length == 5){
|
if(unique.length == 5){
|
||||||
getInfo("20192", unique);
|
getInfo($("#semesters").find(":selected").val(), unique);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -337,6 +340,39 @@ function clear() {
|
|||||||
showEmpty();
|
showEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getSemesters(){
|
||||||
|
var schedulelist = 'https://registrar.utexas.edu/schedules';
|
||||||
|
chrome.runtime.sendMessage({
|
||||||
|
method: "GET",
|
||||||
|
action: "xhttp",
|
||||||
|
url: schedulelist,
|
||||||
|
data: ""
|
||||||
|
}, function (response) {
|
||||||
|
if (response) {
|
||||||
|
var object = $('<div/>').html(response).contents();
|
||||||
|
object.find('.callout2>ul>li>a').each(function () {
|
||||||
|
if($(this).text() != "Course Schedule Archive"){
|
||||||
|
var semname = $(this).text();
|
||||||
|
chrome.runtime.sendMessage({
|
||||||
|
method: "GET",
|
||||||
|
action: "xhttp",
|
||||||
|
url: $(this).attr('href'),
|
||||||
|
data: ""
|
||||||
|
}, function (response) {
|
||||||
|
if (response) {
|
||||||
|
var object = $('<div/>').html(response).contents();
|
||||||
|
object.find('.gobutton>a').each(function () {
|
||||||
|
var semnum = $(this).attr('href').substring($(this).attr('href').lastIndexOf('/')+1);
|
||||||
|
$("#semesters").append(`<option value="${semnum}"">${semname}</option>`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*Course object for passing to background*/
|
/*Course object for passing to background*/
|
||||||
function Course(coursename, unique, profname, datetimearr, status, link, registerlink) {
|
function Course(coursename, unique, profname, datetimearr, status, link, registerlink) {
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
"declarativeContent",
|
"declarativeContent",
|
||||||
"storage",
|
"storage",
|
||||||
"*://*.utdirect.utexas.edu/apps/registrar/course_schedule/*",
|
"*://*.utdirect.utexas.edu/apps/registrar/course_schedule/*",
|
||||||
"*://*.catalog.utexas.edu/ribbit/"
|
"*://*.catalog.utexas.edu/ribbit/",
|
||||||
|
"*://*.registrar.utexas.edu/schedules"
|
||||||
],
|
],
|
||||||
"content_scripts": [{
|
"content_scripts": [{
|
||||||
"css": ["css/styles.css"],
|
"css": ["css/styles.css"],
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
<div style=" margin-bottom: 0px; display:inline-block"></div>
|
<div style=" margin-bottom: 0px; display:inline-block"></div>
|
||||||
<input type="file" id="importOrig" accept=".json" style="display:none"/>
|
<input type="file" id="importOrig" accept=".json" style="display:none"/>
|
||||||
<div class="settings">
|
<div class="settings">
|
||||||
|
<select id="semesters" style="display: none;margin-right: 5px; border-color: #FF9800; margin-top: 3px;">
|
||||||
|
</select>
|
||||||
<input type="text" id="class_id" name="class_id" maxlength="5"
|
<input type="text" id="class_id" name="class_id" maxlength="5"
|
||||||
style="display:none;text-indent: 10px;border-style: solid; border-color: #FF9800;" placeholder="Unique #?"></input>
|
style="display:none;text-indent: 10px;border-style: solid; border-color: #FF9800;" placeholder="Unique #?"></input>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user