diff --git a/popup.css b/css/popup.css similarity index 100% rename from popup.css rename to css/popup.css diff --git a/styles.css b/css/styles.css similarity index 94% rename from styles.css rename to css/styles.css index 43c8bd5d..2d2fd3c0 100644 --- a/styles.css +++ b/css/styles.css @@ -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;} } \ No newline at end of file diff --git a/grades.db b/grades.db index 7605be1e..d00918ec 100644 Binary files a/grades.db and b/grades.db differ diff --git a/disticon.png b/images/disticon.png similarity index 100% rename from disticon.png rename to images/disticon.png diff --git a/background.js b/js/background.js similarity index 89% rename from background.js rename to js/background.js index 8ebacf0f..b1d60863 100644 --- a/background.js +++ b/js/background.js @@ -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; iPlus'); - var modhtml ='