Skip to content

Commit 9610d23

Browse files
authored
Merge pull request #29 from SarwinR/28-ability-to-export-and-import-folders
28 ability to export and import folders
2 parents d6901a9 + 998880f commit 9610d23

File tree

5 files changed

+305
-170
lines changed

5 files changed

+305
-170
lines changed

README.md

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,20 @@
1-
# Better Classroom v1.1.3
1+
# Better Classroom v1.1.4
2+
<div style="text-align:center">
3+
<img src="https://github.com/SarwinR/better-classroom/assets/64829298/4d1ed8c4-d2f7-4215-b383-d8b8f9bed3db" style="width:100%;" alt="Better Classroom"/>
4+
</div>
25

36
The Better Classroom extension is designed to help users better manage their classes by allowing them to create folders within Google Classroom. With this extension, users can easily organize their classes by grouping them into folders based on subject, grade level, or any other criteria they choose. The extension provides a simple and intuitive interface for creating, renaming, and deleting folders, as well as moving classes between folders. Users can also rename their classes, making it even easier to keep track of their academic responsibilities. By making it easier to manage and navigate through their classes, Better Classroom can help users save time and stay organized.
47

58
<a href="https://github.com/SarwinR/better-classroom/issues/new?template=feature_request.md"><img src="https://img.shields.io/badge/Suggest-Feature-green.svg"/></a> <a href="https://github.com/SarwinR/better-classroom/issues/new?template=bug_report.md"><img src="https://img.shields.io/badge/Report-Bug-red.svg"/></a>
69

7-
<br>
8-
9-
## Main Features
10-
11-
- Ability to create folders within Google Classroom
12-
- Ability to rename classes
13-
14-
<br>
15-
16-
## Download Extension
10+
# Download Extension
1711

1812
### From Extension Stores (Recommended)
1913

20-
<a href="https://microsoftedge.microsoft.com/addons/detail/ofjjjjceeenagpnglijjmhbjlgidhiml" target="_blank"><img src="https://img.shields.io/badge/Edge%20Add%20Ons-v1.1.2-g.svg"/></a> <a target="_blank" href="https://chrome.google.com/webstore/detail/better-classroom/maibneeahfkanhakkogkbcakcadjejkl"><img src="https://img.shields.io/badge/Chrome%20Web%20Store-v1.1.2-g.svg"/></a>
14+
<a href="https://microsoftedge.microsoft.com/addons/detail/ofjjjjceeenagpnglijjmhbjlgidhiml" target="_blank"><img src="https://img.shields.io/badge/Edge%20Add%20Ons-v1.1.4-g.svg"/></a> <a target="_blank" href="https://chrome.google.com/webstore/detail/better-classroom/maibneeahfkanhakkogkbcakcadjejkl"><img src="https://img.shields.io/badge/Chrome%20Web%20Store-v1.1.4-g.svg"/></a>
2115

2216
### From GitHub
2317

2418
1. Download the Source Code (zip) from [Releases](https://github.com/SarwinR/better-classroom/releases).
2519
2. Extract the zip file.
2620
3. [Check the guide on how to install an unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
27-
28-
<br>
29-
30-
## Bug Fixes / New Features
31-
32-
- [x] [Modal Close button onHover Design Not as Intended](https://github.com/SarwinR/better-classroom/issues/7)
33-
- [x] [Extension causes account selector and product button to break](https://github.com/SarwinR/better-classroom/issues/15)
34-
- [x] [No validation when editing folder name](https://github.com/SarwinR/better-classroom/issues/17)
35-
- [x] [No Proper error message to notify user when no classes are found while creating/editing folder](https://github.com/SarwinR/better-classroom/issues/12)
36-
37-
38-
<br>
39-
40-
## Known Bugs
41-
42-
- [ ] Bugs are currently on vacation. 🐛🧳✈️
43-
44-
<br>
45-
46-
## Browser Support
47-
48-
| Browser | Status |
49-
| --------------- | ------------------------------------------------------------------------- |
50-
| Chromium Based | <img src="https://img.shields.io/badge/Status-Fully%20Functional-g.svg"/> |
51-
| Mozilla Firefox | <img src="https://img.shields.io/badge/Status-Needs%20Porting-red.svg"/> |

main.js

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,55 @@
11
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
2-
if (request.action == "saveClassData") {
3-
chrome.storage.local.set(
4-
{
5-
classData: request.classData,
6-
},
7-
function () {
8-
sendResponse({ status: "success: ", data: request.data });
9-
}
10-
);
11-
} else if (request.action == "getClassData") {
12-
chrome.storage.local.get(["classData"], function (result) {
13-
if (result.classData == undefined) {
14-
result.classData = {};
15-
}
16-
sendResponse(result);
17-
});
18-
} else if (request.action == "saveFolderData") {
19-
chrome.storage.local.set(
20-
{
21-
folderData: request.folderData,
22-
},
23-
function () {
24-
sendResponse({ status: "success: ", data: request.data });
25-
}
26-
);
27-
} else if (request.action == "getFolderData") {
28-
chrome.storage.local.get(["folderData"], function (result) {
29-
if (result.folderData == undefined) {
30-
result.folderData = { folders: {}, folderActiveClasses: {} };
31-
}
2+
if (request.action == "saveClassData") {
3+
chrome.storage.local.set(
4+
{
5+
classData: request.classData,
6+
},
7+
function () {
8+
sendResponse({ status: "success: ", data: request.data });
9+
}
10+
);
11+
} else if (request.action == "getClassData") {
12+
chrome.storage.local.get(["classData"], function (result) {
13+
if (result.classData == undefined) {
14+
result.classData = {};
15+
}
16+
sendResponse(result);
17+
});
18+
} else if (request.action == "saveFolderData") {
19+
chrome.storage.local.set(
20+
{
21+
folderData: request.folderData,
22+
},
23+
function () {
24+
sendResponse({ status: "success: ", data: request.data });
25+
}
26+
);
27+
} else if (request.action == "getFolderData") {
28+
chrome.storage.local.get(["folderData"], function (result) {
29+
if (result.folderData == undefined) {
30+
result.folderData = { folders: {}, folderActiveClasses: {} };
31+
}
3232

33-
sendResponse(result);
34-
});
35-
} else if (request.action == "getLastSelectedFolder") {
36-
chrome.storage.local.get(["lastSelectedFolder"], function (result) {
37-
if (result.lastSelectedFolder == undefined) {
38-
result.lastSelectedFolder = "__All Classes__";
39-
}
33+
sendResponse(result);
34+
});
35+
} else if (request.action == "getLastSelectedFolder") {
36+
chrome.storage.local.get(["lastSelectedFolder"], function (result) {
37+
if (result.lastSelectedFolder == undefined) {
38+
result.lastSelectedFolder = "__All Classes__";
39+
}
4040

41-
sendResponse(result);
42-
});
43-
} else if (request.action == "setLastSelectedFolder") {
44-
chrome.storage.local.set(
45-
{ lastSelectedFolder: request.data.lastSelectedFolder },
46-
function () {
47-
sendResponse({ status: "success" });
48-
}
49-
);
50-
}
41+
sendResponse(result);
42+
});
43+
} else if (request.action == "setLastSelectedFolder") {
44+
chrome.storage.local.set(
45+
{ lastSelectedFolder: request.data.lastSelectedFolder },
46+
function () {
47+
sendResponse({ status: "success" });
48+
}
49+
);
50+
} else if (request.action == "console_log") {
51+
console.log(request.data);
52+
}
5153

52-
return true;
54+
return true;
5355
});

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "Better Classroom",
44
"description": "Better Classroom is a Google Chrome extension that lets users create folders to organize their classes in Google Classroom.",
5-
"version": "1.1.3",
5+
"version": "1.1.4",
66
"icons": {
77
"16": "assets/icons/extension_icons/16.png",
88
"48": "assets/icons/extension_icons/48.png",

popup.html

Lines changed: 121 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,124 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<meta charset="utf-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1">
6-
<title>Better Classroom</title>
7-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
8-
<style>
9-
body {
10-
background-color: #f6f6f6;
11-
font-family: 'Roboto', Arial, sans-serif;
12-
margin: 0;
13-
padding: 0;
14-
}
15-
.container {
16-
display: flex;
17-
flex-direction: column;
18-
align-items: center;
19-
justify-content: center;
20-
width: 250px;
21-
height: 300px;
22-
margin: 0 auto;
23-
padding: 10px;
24-
}
25-
h1 {
26-
color: #202124;
27-
font-size: 24px;
28-
margin: 0 0 12px;
29-
}
30-
p {
31-
text-align: center;
32-
color: #5f6368;
33-
font-size: 14px;
34-
margin: 0 0 24px;
35-
}
36-
a {
37-
display: inline-block;
38-
padding: 8px 16px;
39-
border-radius: 4px;
40-
font-size: 12px;
41-
text-decoration: none;
42-
color: #202124;
43-
background-color: #fbbc04;
44-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
45-
transition: background-color 0.3s, box-shadow 0.3s;
46-
}
47-
a:hover {
48-
background-color: #ffac33;
49-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
50-
}
51-
.buy-a-coffee {
52-
display: flex;
53-
align-items: center;
54-
margin-top: 12px;
55-
}
56-
.buy-a-coffee span {
57-
margin-right: 8px;
58-
}
59-
.version {
60-
font-size: 10px;
61-
margin-top: 24px;
62-
color: #5f6368;
63-
}
64-
</style>
65-
<script src="popup.js"></script>
66-
</head>
67-
<body>
68-
<div class="container">
69-
<h1>Better Classroom</h1>
70-
<p>An extension that allows you to create folders in Google Classroom to better organize your classes.</p>
71-
<a class="other-links" href="https://github.com/SarwinR/better-classroom/issues" target="_blank">Report an Issue</a>
72-
<a class="buy-a-coffee" href="https://www.buymeacoffee.com/sarwinr" target="_blank">
73-
<span>Buy Me A Coffee</span>
74-
</a>
75-
<div class="version" id="version">Version: 0.0.0</div>
76-
</div>
77-
</body>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<title>Better Classroom</title>
7+
<link
8+
rel="stylesheet"
9+
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
10+
/>
11+
<style>
12+
body {
13+
background-color: #f6f6f6;
14+
font-family: "Roboto", Arial, sans-serif;
15+
margin: 0;
16+
padding: 0;
17+
}
18+
.container {
19+
display: flex;
20+
flex-direction: column;
21+
align-items: center;
22+
justify-content: center;
23+
width: 300px;
24+
height: 100vh;
25+
margin: 0 auto;
26+
padding: 0 24px;
27+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
28+
background-color: #ffffff;
29+
border-radius: 8px;
30+
}
31+
h1 {
32+
color: #202124;
33+
font-size: 28px;
34+
}
35+
h2 {
36+
color: #202124;
37+
font-size: 20px;
38+
margin: 15px 0 2px;
39+
width: 100%;
40+
text-align: left;
41+
}
42+
p {
43+
text-align: center;
44+
color: #5f6368;
45+
font-size: 16px;
46+
margin: 0 0 24px;
47+
}
48+
a,
49+
button {
50+
display: inline-block;
51+
padding: 10px 20px;
52+
border-radius: 4px;
53+
font-size: 14px;
54+
text-decoration: none;
55+
color: #ffffff;
56+
background-color: #4285f4;
57+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
58+
transition: background-color 0.3s, box-shadow 0.3s;
59+
margin: 8px 0;
60+
text-align: center;
61+
width: 80%;
62+
border: none;
63+
}
64+
a:hover,
65+
button:hover {
66+
background-color: #357ae8;
67+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
68+
}
69+
button:focus {
70+
outline: none;
71+
}
72+
.version {
73+
font-size: 12px;
74+
margin-top: 24px;
75+
color: #5f6368;
76+
}
77+
</style>
78+
<script src="popup.js"></script>
79+
</head>
80+
<body>
81+
<div class="container">
82+
<h1>Better Classroom</h1>
83+
84+
<h2>Support Me</h2>
85+
<a
86+
class="buy-a-coffee"
87+
href="https://www.buymeacoffee.com/sarwinr"
88+
target="_blank"
89+
>
90+
<span>Buy Me A Coffee</span>
91+
</a>
92+
<a
93+
class="buy-a-coffee"
94+
href="https://github.com/sponsors/SarwinR"
95+
target="_blank"
96+
>
97+
<span>Sponsor Me on GitHub</span>
98+
</a>
99+
100+
<h2>Feedback</h2>
101+
<a
102+
class="other-links"
103+
href="https://github.com/SarwinR/better-classroom/issues"
104+
target="_blank"
105+
>
106+
Report an Issue
107+
</a>
108+
109+
<h2>Settings</h2>
110+
111+
<button id="export-folders-button">Export Folders</button>
112+
113+
<button id="import-folders-button">
114+
Import Folders
115+
<br />
116+
<span>(It will overwrite all your current folders)<span>
117+
</button>
118+
119+
<p id="setting-message"></p>
120+
121+
<div class="version" id="version">Version: 0.0.0</div>
122+
</div>
123+
</body>
78124
</html>

0 commit comments

Comments
 (0)