Skip to content

Commit

Permalink
Reorganise files and update libraries
Browse files Browse the repository at this point in the history
- Files reorganised into directories.
- Firebase libraries updated. Others are up to date already.
  • Loading branch information
govindbalaji-s committed Dec 12, 2019
1 parent 9b5ad9c commit 0f83f34
Show file tree
Hide file tree
Showing 25 changed files with 22 additions and 27 deletions.
2 changes: 0 additions & 2 deletions firebase-app.js

This file was deleted.

2 changes: 0 additions & 2 deletions firebase-auth.js

This file was deleted.

2 changes: 0 additions & 2 deletions firebase-firestore.js

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion google.txt

This file was deleted.

2 changes: 2 additions & 0 deletions js/firebase-app.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions js/firebase-auth.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions js/firebase-firestore.js

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"name": "AIMS-Helper",
"version": "0.1",
"background": {
"scripts": ["background.js"],
"scripts": ["/src/bg/background.js"],
"persistent":false
},
"page_action": {
"default_popup":"popup.html "
"default_popup":"/src/popup/popup.html"
},
"content_security_policy":"script-src 'self' https://www.gstatic.com/ https://*.firebaseio.com https://www.googleapis.com https://apis.google.com; object-src 'self'",
"permissions": ["declarativeContent", "storage", "tabs", "<all_urls>","http://*/","https://*/", "identity"],
Expand Down
File renamed without changes
3 changes: 0 additions & 3 deletions slotInfo.json

This file was deleted.

2 changes: 1 addition & 1 deletion background.js → src/bg/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
function(request, sender)
{
if (request.action == "LaunchTimetableFile")
chrome.tabs.create({ url: chrome.runtime.getURL("table.html") });
chrome.tabs.create({ url: chrome.runtime.getURL("/src/timetable/table.html") });
}
);
File renamed without changes.
4 changes: 2 additions & 2 deletions gpa_report.html → src/gpa/gpa_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style type="text/css">
@font-face {
font-family: Roboto;
src: url('Roboto-Regular.ttf');
src: url('/fonts/Roboto-Regular.ttf');
}
body{
text-align: center;
Expand Down Expand Up @@ -122,7 +122,7 @@ <h1>Selected Courses</h1>
</div>
<br/>
<button class="download-pdf">Download PDF</button>
<script src="html2pdf.bundle.min.js"></script>
<script src="/js/html2pdf.bundle.min.js"></script>
<script src="gpa_report.js"></script>
</body>
</html>
File renamed without changes.
3 changes: 1 addition & 2 deletions popup.html → src/popup/popup.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<script src="jquery.js"></script>
<style>
body {
box-sizing: border-box;
Expand Down Expand Up @@ -67,7 +66,7 @@
<button class="generate-timetable-button">Generate Timetable</button>
<button class="calculate-gpa-button">Calculate GPA</button>
</div>
<img src="spinner.gif" id="loading-image"/>
<img src="/res/spinner.gif" id="loading-image"/>
<script src="popup.js"></script>
</body>
</html>
10 changes: 5 additions & 5 deletions popup.js → src/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ chrome.runtime.onMessage.addListener(function(request, sender) {

function onWindowLoad() {
chrome.tabs.executeScript(null, {
file: "getSource.js"
file: "/src/timetable/getSource.js"
}, function() {
if (chrome.runtime.lastError) {
console.log(chrome.runtime.lastError.message);
Expand All @@ -48,7 +48,7 @@ function removeLoading() {
function injectTimetable() {
showLoading();
chrome.tabs.executeScript(null, {
file: "activateTimetable.js"
file: "/src/timetable/activateTimetable.js"
}, function() {
if (chrome.runtime.lastError) console.log(chrome.runtime.lastError.message);
});
Expand All @@ -57,10 +57,10 @@ function injectTimetable() {
function injectGPA() {
showLoading();
chrome.tabs.executeScript(null, {
file: "jquery-3.4.1.min.js"
file: "/js/jquery-3.4.1.min.js"
}, function(result){
chrome.tabs.executeScript(null, {
file: "activateGPA.js"
file: "/src/gpa/activateGPA.js"
}, function() {
if(chrome.runtime.lastError) console.log(chrome.runtime.lastError.message);
});
Expand All @@ -75,7 +75,7 @@ chrome.runtime.onMessage.addListener(function(request, sender){
//TODO: use the courses and GPA to display in another tab.

localStorage.setItem("courseGPA", JSON.stringify(request.data));
chrome.tabs.create({ url: chrome.runtime.getURL("gpa_report.html")});
chrome.tabs.create({ url: chrome.runtime.getURL("/src/gpa/gpa_report.html")});
}
});
document.getElementsByClassName("generate-timetable-button")[0].onclick = function() {
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions table.html → src/timetable/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style type="text/css">
@font-face {
font-family: Title;
src: url('OpenSans-Light.ttf');
src: url('/fonts/OpenSans-Light.ttf');
}
html {
background-color: #1F2739;
Expand Down Expand Up @@ -263,10 +263,10 @@
<button class="download-pdf">Download PDF</button>&nbsp;&nbsp;&nbsp;
<button class="send-to-db">Upload timetable</button>
</div>
<script src="firebase-app.js"></script>
<script src="firebase-auth.js"></script>
<script src="firebase-firestore.js"></script>
<script src="html2pdf.bundle.min.js"></script>
<script src="/js/firebase-app.js"></script>
<script src="/js/firebase-auth.js"></script>
<script src="/js/firebase-firestore.js"></script>
<script src="/js/html2pdf.bundle.min.js"></script>
<script src="table.js"></script>
</body>
</html>
File renamed without changes.

0 comments on commit 0f83f34

Please sign in to comment.