reorganization
This commit is contained in:
@@ -1,197 +1,197 @@
|
||||
/* The Modal (background) */
|
||||
.modal {
|
||||
display: none; /* Hidden by default */
|
||||
position: fixed; /* Stay in place */
|
||||
z-index: 1; /* Sit on top */
|
||||
padding-top: 100px; /* Location of the box */
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%; /* Full height */
|
||||
background-color: rgb(0,0,0); /* Fallback color */
|
||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #fefefe;
|
||||
margin: auto;
|
||||
max-height: 85%;
|
||||
overflow-y: auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
|
||||
/* The Close Button */
|
||||
.close {
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
padding: 5px;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: x-large;
|
||||
font-weight: bold ;
|
||||
padding-top: 5px;
|
||||
padding-left: 5px;
|
||||
margin:5px 0px 5px 0px;
|
||||
|
||||
}
|
||||
.description {
|
||||
padding: 5px;
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
|
||||
.profname {
|
||||
margin-left: 5px;
|
||||
padding-bottom: 5px;
|
||||
font-size: medium;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.dateTimePlace {
|
||||
margin-left: 5px;
|
||||
font-size: smaller;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#chart {
|
||||
min-width: auto;
|
||||
max-width: 800px;
|
||||
height: 250px;
|
||||
margin: 0 auto
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
.card {
|
||||
/* Add shadows to create the "card" effect */
|
||||
transition: 0.3s;
|
||||
margin-bottom: 10px;
|
||||
box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)
|
||||
}
|
||||
|
||||
/* On mouse-over, add a deeper shadow */
|
||||
.card:hover {
|
||||
box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)
|
||||
}
|
||||
|
||||
/* Add some padding inside the card container */
|
||||
.cardcontainer {
|
||||
padding: 2px 16px;
|
||||
transition:width 300ms ease-in-out, height 300ms ease-in-out;
|
||||
}
|
||||
|
||||
.description {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.topbuttons .matbut {
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
/* Material style */
|
||||
.matbut {
|
||||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
margin: 10px 10px 10px 0px;
|
||||
padding: 10px 10px;
|
||||
border-radius: 10px;
|
||||
font-size: medium;
|
||||
font-style: bold;
|
||||
box-shadow: 2px 2px 4px rgba(0, 0, 0, .4);
|
||||
background: #FF9800;
|
||||
}
|
||||
|
||||
/* Ripple magic */
|
||||
.matbut{
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.matbut:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: rgba(255, 255, 255, .5);
|
||||
opacity: 0;
|
||||
border-radius: 100%;
|
||||
transform: scale(1, 1) translate(-50%);
|
||||
transform-origin: 50% 50%;
|
||||
}
|
||||
|
||||
@keyframes ripple {
|
||||
0% {
|
||||
transform: scale(0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
20% {
|
||||
transform: scale(25, 25);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: scale(40, 40);
|
||||
}
|
||||
}
|
||||
|
||||
.matbut:focus:not(:active)::after {
|
||||
animation: ripple 1s ease-out;
|
||||
}
|
||||
|
||||
#snackbar {
|
||||
visibility: hidden;
|
||||
min-width: 250px;
|
||||
margin-left: -200px;
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
border-radius: 2px;
|
||||
padding: 16px;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
left: 50%;
|
||||
bottom: 30px;
|
||||
}
|
||||
|
||||
#snackbar.show {
|
||||
visibility: visible;
|
||||
|
||||
-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||
animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadein {
|
||||
from {bottom: 0; opacity: 0;}
|
||||
to {bottom: 30px; opacity: 1;}
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
from {bottom: 0; opacity: 0;}
|
||||
to {bottom: 30px; opacity: 1;}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeout {
|
||||
from {bottom: 30px; opacity: 1;}
|
||||
to {bottom: 0; opacity: 0;}
|
||||
}
|
||||
|
||||
@keyframes fadeout {
|
||||
from {bottom: 30px; opacity: 1;}
|
||||
to {bottom: 0; opacity: 0;}
|
||||
/* The Modal (background) */
|
||||
.modal {
|
||||
display: none; /* Hidden by default */
|
||||
position: fixed; /* Stay in place */
|
||||
z-index: 1; /* Sit on top */
|
||||
padding-top: 100px; /* Location of the box */
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%; /* Full height */
|
||||
background-color: rgb(0,0,0); /* Fallback color */
|
||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #fefefe;
|
||||
margin: auto;
|
||||
max-height: 85%;
|
||||
overflow-y: auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
|
||||
/* The Close Button */
|
||||
.close {
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
padding: 5px;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: x-large;
|
||||
font-weight: bold ;
|
||||
padding-top: 5px;
|
||||
padding-left: 5px;
|
||||
margin:5px 0px 5px 0px;
|
||||
|
||||
}
|
||||
.description {
|
||||
padding: 5px;
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
|
||||
.profname {
|
||||
margin-left: 5px;
|
||||
padding-bottom: 5px;
|
||||
font-size: medium;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.dateTimePlace {
|
||||
margin-left: 5px;
|
||||
font-size: smaller;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#chart {
|
||||
min-width: auto;
|
||||
max-width: 800px;
|
||||
height: 250px;
|
||||
margin: 0 auto
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
.card {
|
||||
/* Add shadows to create the "card" effect */
|
||||
transition: 0.3s;
|
||||
margin-bottom: 10px;
|
||||
box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)
|
||||
}
|
||||
|
||||
/* On mouse-over, add a deeper shadow */
|
||||
.card:hover {
|
||||
box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)
|
||||
}
|
||||
|
||||
/* Add some padding inside the card container */
|
||||
.cardcontainer {
|
||||
padding: 2px 16px;
|
||||
transition:width 300ms ease-in-out, height 300ms ease-in-out;
|
||||
}
|
||||
|
||||
.description {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.topbuttons .matbut {
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
/* Material style */
|
||||
.matbut {
|
||||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
margin: 10px 10px 10px 0px;
|
||||
padding: 10px 10px;
|
||||
border-radius: 10px;
|
||||
font-size: medium;
|
||||
font-style: bold;
|
||||
box-shadow: 2px 2px 4px rgba(0, 0, 0, .4);
|
||||
background: #FF9800;
|
||||
}
|
||||
|
||||
/* Ripple magic */
|
||||
.matbut{
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.matbut:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: rgba(255, 255, 255, .5);
|
||||
opacity: 0;
|
||||
border-radius: 100%;
|
||||
transform: scale(1, 1) translate(-50%);
|
||||
transform-origin: 50% 50%;
|
||||
}
|
||||
|
||||
@keyframes ripple {
|
||||
0% {
|
||||
transform: scale(0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
20% {
|
||||
transform: scale(25, 25);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: scale(40, 40);
|
||||
}
|
||||
}
|
||||
|
||||
.matbut:focus:not(:active)::after {
|
||||
animation: ripple 1s ease-out;
|
||||
}
|
||||
|
||||
#snackbar {
|
||||
visibility: hidden;
|
||||
min-width: 250px;
|
||||
margin-left: -200px;
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
border-radius: 2px;
|
||||
padding: 16px;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
left: 50%;
|
||||
bottom: 30px;
|
||||
}
|
||||
|
||||
#snackbar.show {
|
||||
visibility: visible;
|
||||
|
||||
-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||
animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadein {
|
||||
from {bottom: 0; opacity: 0;}
|
||||
to {bottom: 30px; opacity: 1;}
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
from {bottom: 0; opacity: 0;}
|
||||
to {bottom: 30px; opacity: 1;}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeout {
|
||||
from {bottom: 30px; opacity: 1;}
|
||||
to {bottom: 0; opacity: 0;}
|
||||
}
|
||||
|
||||
@keyframes fadeout {
|
||||
from {bottom: 30px; opacity: 1;}
|
||||
to {bottom: 0; opacity: 0;}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
@@ -8,7 +8,7 @@ chrome.runtime.onMessage.addListener(function(request, sender, response) {
|
||||
}
|
||||
}
|
||||
else if(request.command == "isSingleConflict"){
|
||||
isSingleConflict(request.dtarr,response);
|
||||
isSingleConflict(request.dtarr,request.unique,response);
|
||||
}
|
||||
else if(request.command == "checkConflicts"){
|
||||
checkConflicts(response);
|
||||
@@ -58,16 +58,25 @@ function checkConflicts(sendResponse) {
|
||||
});
|
||||
}
|
||||
|
||||
function isSingleConflict(currdatearr, sendResponse){
|
||||
function isSingleConflict(currdatearr, unique, sendResponse){
|
||||
chrome.storage.sync.get('savedCourses', function(data) {
|
||||
var courses = data.savedCourses;
|
||||
var conflict = false;
|
||||
for(var i = 0; i<courses.length;i++){
|
||||
if(isConflict(currdatearr,courses[i].datetimearr)){
|
||||
sendResponse({isConflict:true});
|
||||
return false;
|
||||
conflict = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
sendResponse({isConflict:false});
|
||||
var contains = false;
|
||||
var i = 0;
|
||||
while(i < courses.length && !contains){
|
||||
if(courses[i].unique == unique){
|
||||
contains = true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
sendResponse({isConflict:conflict,alreadyContains:contains});
|
||||
});
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
0
moment.min.js → js/moment.min.js
vendored
0
moment.min.js → js/moment.min.js
vendored
@@ -85,9 +85,7 @@ $(document).ready(function() {
|
||||
}
|
||||
updateConflicts();
|
||||
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
|
||||
for(var i = 0; i<tabs.length;i++){
|
||||
chrome.tabs.sendMessage(tabs[i].id, {command: "update"});
|
||||
}
|
||||
chrome.tabs.sendMessage(tabs[0].id, {command: "update"});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -145,9 +143,7 @@ function makeLine(index){
|
||||
function clear(){
|
||||
chrome.storage.sync.set({savedCourses: []});
|
||||
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
|
||||
for(var i = 0; i<tabs.length;i++){
|
||||
chrome.tabs.sendMessage(tabs[i].id, {command: "update"});
|
||||
}
|
||||
chrome.tabs.sendMessage(tabs[0].id, {command: "update"});
|
||||
});
|
||||
console.log("cleared");
|
||||
$("#courseList").fadeOut(300,function(){
|
||||
@@ -8,18 +8,17 @@
|
||||
"declarativeContent",
|
||||
"storage",
|
||||
"*://*.utdirect.utexas.edu/apps/registrar/course_schedule/*",
|
||||
"*://*.ratemyprofessors.com/*",
|
||||
"*://*.catalog.utexas.edu/ribbit/"
|
||||
],
|
||||
"content_scripts": [{
|
||||
"css": ["styles.css"],
|
||||
"js": ["moment.min.js","sql-memory-growth.js","highcharts.js","jquery-3.3.1.min.js","content.js"],
|
||||
"css": ["css/styles.css"],
|
||||
"js": ["js/moment.min.js","js/sql-memory-growth.js","js/highcharts.js","js/jquery-3.3.1.min.js","js/content.js"],
|
||||
"matches": ["https://utdirect.utexas.edu/apps/registrar/course_schedule/*"]
|
||||
}],
|
||||
"web_accessible_resources": [
|
||||
"grades.db","disticon.png"],
|
||||
"grades.db","images/disticon.png"],
|
||||
"background": {
|
||||
"scripts": ["background.js"],
|
||||
"scripts": ["js/background.js"],
|
||||
"persistent": true
|
||||
},
|
||||
"browser_action": {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="popup.css">
|
||||
<link rel="stylesheet" href="css/popup.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="card" id="header">
|
||||
@@ -15,8 +15,8 @@
|
||||
<ul id= "courseList" style="list-style-type: none;padding: 5px;"></ul>
|
||||
<h2 id="empty" style="font-weight: normal;font-size: large;margin: 60px 30px 40px 30px ;">Doesn't Look Like Anything To Me.<br>
|
||||
<span style="font-size: small;display:table;margin:0 auto;font-weight: bold">(No Courses Saved)</span><h2>
|
||||
<script src="jquery-3.3.1.min.js"></script>
|
||||
<script src="moment.min.js"></script>
|
||||
<script src="popup.js"></script>
|
||||
<script src="js/jquery-3.3.1.min.js"></script>
|
||||
<script src="js/moment.min.js"></script>
|
||||
<script src="js/popup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
6
todo
6
todo
@@ -1,8 +1,7 @@
|
||||
TODO as of 7/10/18:
|
||||
- eureka integration
|
||||
- use maps for schedule conflict
|
||||
- update page with schedule conflict information
|
||||
|
||||
- descriiption when not loading properly, whne need to refresh page
|
||||
CLEAN UP:
|
||||
Everything lmao
|
||||
|
||||
@@ -45,5 +44,4 @@ FIXED/DONE as of 7/10/18:
|
||||
- FIX toast bug
|
||||
- FIX save course when no times blank
|
||||
- FIX Open popup flickering
|
||||
|
||||
chrome.tabs.create({ 'url': 'chrome://extensions/?options=' + chrome.runtime.id });
|
||||
- update page with schedule conflict information
|
||||
|
||||
Reference in New Issue
Block a user