Skip to content

Commit aaf6716

Browse files
committed
Open Beta 0.1.5.7
1 parent d3ae9af commit aaf6716

File tree

5 files changed

+49
-6
lines changed

5 files changed

+49
-6
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Open Beta 0.1.5.7
2+
3+
## 2019-01-15
4+
5+
### Bug Fixes
6+
7+
* **Final Percent:** Final percent is no longer shown on the main page if the course has no grade.
8+
9+
### Improvements
10+
11+
* **Performance:** More functions have been moved away from using jQuery.
12+
* **Changelog:** A version changelog box is being worked on but is not used yet.
13+
* **Options Page:** Homepage url has been added to the manifest.
14+
115
# Open Beta 0.1.5.6
216

317
## 2019-01-11

src/css/spse.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,14 @@ div.hypo-grade-div-fixed {
9595
cursor: default;
9696
position: relative;
9797
display: inline-block;
98+
}
99+
#update-info {
100+
background-color: #FFF;
101+
box-shadow: 0 10px 20px rgba(0,0,0,0.4);
102+
position: relative;
103+
padding-bottom: 1px;
104+
margin: 0;
105+
padding: 0;
106+
font-size: inherit;
107+
color: #444444;
98108
}

src/js/saspowerschoolff.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ function main_page() {
5858
$course = $grade_rows.eq(i).children('td').eq(3).find("a[href^='scores.html?']");
5959
let first_grade = $grade_rows.eq(i).children('td').eq(2).find(`a[href^='scores.html?']`);
6060
if(first_grade.length === 1) {
61-
fill_percent(first_grade, `https://powerschool.sas.edu.sg/guardian/${first_grade.attr('href')}`, [0], 0)
61+
if(grade_gpa(first_grade.text()) !== -1 ) {
62+
fill_percent(first_grade, `https://powerschool.sas.edu.sg/guardian/${first_grade.attr('href')}`, [0], 0);
63+
}
6264
}
6365
} else {
6466
$course = $grade_rows.eq(i).children('td').eq(2).find("a[href^='scores.html?']");
@@ -69,7 +71,9 @@ function main_page() {
6971
grades.push($course.text());
7072
course_links.push($course.attr('href'));
7173
percents.push(-1);
72-
fill_percent($course, "https://powerschool.sas.edu.sg/guardian/" + $course.attr('href'), percents, percents.length - 1);
74+
if(grade_gpa($course.text()) !== -1 ) {
75+
fill_percent($course, "https://powerschool.sas.edu.sg/guardian/" + $course.attr('href'), percents, percents.length - 1);
76+
}
7377
}
7478

7579
}
@@ -173,7 +177,7 @@ function class_page() {
173177
if(number === -Infinity) {
174178
return;
175179
}
176-
$("table.linkDescList:first").append(`<tr><td><strong>Final Percent: </strong></td><td>` + parseFloat(number).toFixed(2) + ` <div class="tooltip saspe">&#9432;<span class="tooltiptext saspe">85: A+ | 75: A <br />65: B+ | 55: B <br />45: C+ | 35: C <br/>25: D+ | 15: D</span></div></td></tr>`);
180+
document.querySelector("table.linkDescList").append(html2node(`<tr><td><strong>Final Percent: </strong></td><td>` + parseFloat(number).toFixed(2) + ` <div class="tooltip saspe">&#9432;<span class="tooltiptext saspe">85: A+ | 75: A <br />65: B+ | 55: B <br />45: C+ | 35: C <br/>25: D+ | 15: D</span></div></td></tr>`));
177181
}
178182
function login_page() {
179183
/*
@@ -193,6 +197,11 @@ function login_page() {
193197
*/
194198

195199
//document.getElementById('sign-in-content').append(document.createTextNode("Last Seen Grades has been temporarily removed to be improved upon."))
200+
201+
/*
202+
let insert_location = document.querySelector('#content');
203+
insert_location.parentNode.insertBefore(document.createElement('a'), insert_location);
204+
*/
196205
}
197206
function fill_percent($fill_location,url_link,percents, pos_in_arr) {
198207
if(!percent_main_page) {
@@ -289,3 +298,11 @@ function grade_gpa(grade) {
289298
break;
290299
}
291300
}
301+
function html2node(html_string) {
302+
return html2nodelist(html_string)[0];
303+
}
304+
function html2nodelist(html_string) {
305+
let temp = document.createElement('template');
306+
temp.innerHTML = html_string;
307+
return temp.content.childNodes;
308+
}

src/manifest - chromium.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
"manifest_version": 2,
33
"name": "SAS Powerschool Enhancement Suite",
44
"short_name": "SAS PES",
5-
"version": "0.1.5.6",
6-
"version_name": "Public Beta 0.1.5.6",
5+
"version": "0.1.5.7",
6+
"version_name": "Public Beta 0.1.5.7",
77
"author": "Gary Kim",
8+
"homepage_url": "https://gschool.ydgkim.com/saspowerschool/",
89
"description": "Provides various enhancements for SAS Powerschool",
910
"permissions": [
1011
"storage",

src/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
"manifest_version": 2,
33
"name": "SAS Powerschool Enhancement Suite",
44
"short_name": "SAS PES",
5-
"version": "0.1.5.6",
5+
"version": "0.1.5.7",
66
"author": "Gary Kim",
7+
"homepage_url":"https://gschool.ydgkim.com/saspowerschool/",
78
"description": "Provides various enhancements for SAS Powerschool",
89
"permissions": [
910
"storage",

0 commit comments

Comments
 (0)